I'm trying to use a cascading combo box to filter the options that can be entered into a second combo box.
In frmBabies, a Mode of Delivery is selected from 8 options. 4 of these are "normal" deliveries and 4 are caesarean sections.
A second combo box selects the Indication for Operative Delivery. The table tblIndOpDel contains options for normal as well as caesareans. I would like to filter the indications so that the user cannot enter an indication for normal delivery for a caesarean section.
Both tblIndOpDel and tblDelMode have a foreign key to tblDelModeCat, which categories deliveries as normal or caesarean.
I'm stuck on how to proceed from here. Sample database attached.
I have an unbound combobox on a form that is used to filter the records of a subform based on who they have been assigned to. The combo box is based off of a query to the personnel table and utilizes a UNION querry to add the option "**ALL**" with a id number "111111" as the first option in the combo box.
In other words: the combo box has a list of names to choose from and the word "ALL" at the top as the first selection. The idea is that when "**ALL**" is selected, the subform should display all records regardless of who they have been assigned to. I'm trying to accomplish this with VBA. I've started developing the code to try to impliment this, however currently when "**ALL**" is selected, I'm getting a datatype missmatch that seems to be caused by my use of recordset.
I've been using this forum for a couple of weeks but this is my first post, so apologies if I've put it in the wrong place!! I have a table with some drop-down lists to fill certain fields, and I would the available list options to change based on information in other fields. To provide an example:
Field One: The drop down list lets the user choose "Alphabet" or "Number"
Field Two: The drop down list lets the user choose A-Z if "Alphabet" is selected in Field One or 1-100 if "Number" is selected in Field One
Hope I've been clear enough. Any help is greatly appreciated!!
I'm have quite a difficult time getting a form in Access 2010 to perform the way I would like it to. I have multiple tables that I've created, and a query that contains the data from the various tables. I then ran the form wizard to select the data from the query that I wanted to populate in my form and I've added 2 combo boxes.
What I want to do: 1. I want users to be able to select a category in combo box #1 (example: "Bag") 2. I want users to be able to select a detail in combo box #2 based on the category they selected in combo box #1 (example: Combo box #1, "bag" would populate the following selections for combo box #2: "sandwich" and "tool") 3. I want users to then receive a list of suppliers that provide the product they have selected, either "Bag: Sandwich" or "Bag: Tool"
I have combo box #1 populating a list of categories already. However, I am not able to get combo box #2 to provide choices based on the selection chosen for combo box #1.
1 - Maintenance Order 2 - Breakdown Order 3 - Greasing Order
On my form I have two list boxes: An Order Type List box, and an Area Listbox.What query criteria or VBA code would I use so that I could populate a text box with the relevant order number based on the selections of the list boxes. i.e. MaintenanceOrder & Area Z would display MaintenanceOrderNoZ.
Hi all, Please bear with me if I'm asking a dumb question. I've been tasked to create a database from scratch and I've not had much experience working with Access.
**My Question** Using a form is it possible to have the form automatically enter a "value" in one field based on the information inputed by someone in a different field. ie. When some one puts in a value between 0 and 20 in one field it automatically enters a 1 in the other, and when some one puts in a value between 21 and 30 you get a 2 and so on down the line.
I'm attempting to build a simple database for a martial arts tournament registration. The weight division (Fin, Fly, Heavy, etc.) depends on the age, the sex and the weight. I've tried this several different ways, most recently by using one table called "competitors" with all the entrant's information, and several other tables based on the age class/sex (i.e. I have a table called Age 8-9 Male with the weights and divisions in it, and other tables for the other ages/sex). So, basically, what I'd like to have happen is a report that will lookup in the correct table the division, based on the weight entered. In other words, for a record where the age is 8-9 and the sex is Male, the report compares the weight to the values in the 8-9 Male table, or if the record is a 12-13 Female, it looks in the 12-13 Female table for the weight, and places the correct division in the Division field of the report. Probably going about this wrong.....but any help would be appreciated.
I have two text boxes for which I am trying have show and error message when the proper data is not entered. One text box is for PLANID and the other is for Date. I would like the PLANID to be checked 1st. The PLANID needs to be either 7 digits or 10. If it is not, the message would be "Please enter a valid PLANID". If it is 7 or 10 digits, then it should check the Date text box.
If it is blank, the message would be "Please enter a valid Date". If they are both blank, the PLANID message should appear 1st. Below is what I have written. The problem that I am having is that when the PLANID is 10 digits and the date is blank, the "Please enter a valid PLANID" message is showing rather than the "Please enter a valid Date" message.
Private Sub Btn_Refresh_Data_for_One_Plan_Click() Me.txtboxPLANID.Value = UCase(Me.txtboxPLANID.Value) If ((Len(Me.txtboxPLANID.Value) = 7 And Len(Me.txtboxPLANID.Value) = 10) And (Not IsNull(Me.txtboxPLANID.Value)) And (Not IsNull(Me.TxtboxDate.Value))) Then Dim stDocName As String stDocName = "Mcr_RUN_MATCH_DIFFERENCES"
I am trying to populate a list box with an event after update in a combo box. I can get the formula to work using 2 criteria, the problem is i nee to add a third criteria. When I try to add it I get the run-time 13 error.
Here is the code I am trying to use:
Private Sub cboStatusRFQ_AfterUpdate() Me.cboSupplier.RowSource = "SELECT DISTINCT [Consolidated_Master_Req_Pool.RFQ Contact] " & _ "FROM Consolidated_Master_Req_Pool " & _ "WHERE consolidated_master_req_pool.Complete = FALSE AND [Consolidated_Master_Req_Pool.RFQ Supplier] = '" & Nz(cboStatusRFQ.Value) & "'" And "[cosolidated_master_req_pool.Status] = '" & "[SUPPLIER_RFQ FOLLOW-UP]" & "'" & _ "ORDER BY [Consolidated_Master_Req_Pool.RFQ Contact];" Me.cboSupplier = Null End Sub
On paper I have designed a faculty contact database and have now come to the point where I am designing the form. In the contact information table are Cell, Home, Office fields as well as Personal, Work, Alternate email fields which will contain the corresponding information. On the form after the information is entered the person needs to select an option from each of four combo boxes to indicate which is the preferred number, number for student, preferred email and email for students. The question is how to populate the text fields in a report based on the selection of the combo boxes with the information stored in the corresponding field (cell, home, office phone numbers and personal, work and alternate email). I am assuming it is done in the query but I don't know how or can it be done in vba?
I am trying to populate the text boxes in a form with data from a table based on the selection a user has made in a combobox. I am trying to do this through a DLOOKUP in the text boxes Control Source using the following:
I have a listbox call lst with two columns, what I want to do is to populate this two column with "firstdata" and "seconddata" respectively. What I do is: Me.lst.RowSource = """firstdata""; ""seconddata"""
But I see nothing appear, what is the corect way to achieve in vba?
I am trying to populate multiple text boxes from combo box using one table. First text box is getting populate on base of combo box value while 2nd text box is not getting populating.
I have used the following to populate the text boxes, even row count is correct, But why is not 2nd text box is not populating ?
One thing I noted when I provide the control source then selection gets stop from combo box...I am giving the valid control source is customerID but its not working.Could it be the reason ? Why selection gets stop from combo box when provide the control source ? If remove the control source then 1st text box is getting filled on basis of combo selection and 2nd text box value is not getting filled as describe above.
I have a form called frmPO based on a table called tblPO One of the fields in tblPO is linked to the field idAddress in the table tblAddresses
The following fields exist in both tblAddresses and tblPO Company Address1 Address2 City ZP State
The form contains controls for these fields on tblPO. I would like to give the user the choice to either enter a shipping address manually, or selecting a preregistered address from tblAdresses. For this I would like a combo box showing the values of idAddress. I f a user selects a preregistered shipping address, I would like the form to fill the rest of the fields based on the value of this control.
My understanding is that I should set a BeforeUpdate event to set the values of the different controls, unfortunately my command of VBA amounts to 0.
I have two tables: tblWeightTickets and tblWasteType.
I want to create a form: frmWeightTickets, where a user can enter information and the data is stored in tblWeightTickets.
There are two fields in particular that I am working on ... "WasteType" and "Rate".
On the form, I want "WasteType" to be a combobox "cboWasteType" and when I select a type of waste I want the "Rate" textbox on the same form to auto populate with the rate amount for that particular type of waste (i.e. recycling, garbage, etc).
The Rate amount is located in the table: tblWasteType under the field name "Rate". How can I do this and at the same time store the information in the tblWeightTickets? I already have the combo box loaded with the types of waste - I just need it to populate the rate text box and store it in the Weight Tickets table.
I have a form that request the User to enter a Parcel ID number (99-9a-99-99aaa-aaa-aaaa). The sub form asks for the subdivision number, block number, and lot number. The subdivision number, block number and lot number are normally part of the Parcel ID number but sometimes they can be different. I want the sub form to fill in the Subdivision number, block number, and lot number as a default but allow the user to change the value if needed. currently the sub form will only show what is entered into the table itself if a change is made on the main form the sub form does not reflect the change.
I'm creating a form that when the user selects the following categories in the same combo box (Date Received, Date Reviewed, Date kitted, In Work, Complete) it auto populates dates in the respective fields. As I mentioned, it's only one combo box. The dates will be spread out, so the user will change the combo box selection based on when these events occur. I already have a field for each category both on the table and form. Also, I do have multiple tables for other parts of data, but these categories all fall into the same table.
I want to create a text box within a form that automatically populates a contact number based on a selection from a combo box, also in the same form.
For example, I have a Bidders Table (tblTenders), this form includes information regarding the Tendor like the company name and a main contact within that company and a phone number for that contact.
I've created a separate table for all the contacts called tblContacts. This table holds all the contact information for each contact. I have a simple form called frmTenders that asks the user to input the Customer (which is the company who are bidding) and the Main Contact, which is a combo box to select the main contact from tblContacts. Below that combo box is a text box called 'Contact Number' - I want this box to display the contact number for the main contact automatically when a main contact is selected from the combo box.
The contact number text box isn't storing that information in any tables etc. It's just for viewing purposes when we need to make a call to that specific tender.
I am fairly new to access but so far I have been able to get what i need from it, until now. I am trying to find a way of comparing two sets of data to find out an employee's average productivty.
Table 1 -Hours Worked (by day) - contains 'name' 'date' and '# of hours' worked - an employee would enter the hours here on a daily basis
Table 2 - Contracts Keyed (by month) - contains the number of contracts worked that is derived from seperate system - this is entered on a monthly basis (so for example: John keyed 30 contracts for the month of January) - the system i am pulling this info from does not have the ability to pull a daily count of contract per employee, only a range of dates and it then provides the sum for that range (unless I ran a query for each day, for each employee which would take me hours) - employees dont have access to this system to enter their own # of contracts keyed on a daily basis. - for entry, so far i have just been putting the first of the month and then the # of contracts.
In a nutshell, this is the calculation I am trying to create:
(Sum of "# of hours" for the month) / (total "# of contracts keyed" for the month) = employees average hourly productivity.
I have tried to do this with various types of queries and reports but with no luck, I get a prompt saying that access can't compare the 2 fields.
Is there a way to compare the data that is entered daily with the data i would enter monthly?