Using three drop down lists together

cstickman

Board Regular
Joined
Oct 23, 2008
Messages
137
Hello everyone
I am very new to Access and I just started a new job and all they use is Access. I have been tasked with creating a new Q&A database and I am lost. I did do some training with another Access developer at the company, but of course he is on vacation this week. So what I am trying to do is write to a new database from a form and having them use drop down boxes first and then have all of it write to the table. So I have two tables. One was created to capture the questions and then a table to put the question in the correct category. So I created a new form and imported in the excel table of categories. They have category 1, sub category 1 and yet another sub category 1. So on the drop down list I want them to choose what category they want to use first. Then depending on that selection pick from the second drop down the sub category for the selected category. Then if it has a third sub category have it display another selection for them to choose. I can make the first drop down which I was amazed I even did. So how do I link it now to the sub category's? Reading online it is possible, but nothing I found had a good tutorial on how to do it. I read something about DLOOKUP and re-query to have it pull the right column. So any help with this part would be greatly appreciated before I even attempt in getting it to write the data into the other table. If I am not clear please let me know and I will try to explain it differently. Thanks
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
To do the multi-combo box
each combo box has a query in the recordsource.
Here the user picks a state, then in the next combo picks a Company (in that state)
The 1st combo say cboStates. User picks a state, then picks a company from the cboCo box.
The cboStates AfterUpdate event will trigger when the user picks it, and this will update the next combo.

sub cboStates_AfterEvent()
cboCo.requery
end sub

The cboCo query say qsCoViaState will reference the cboStates in the query sql
Select * from tCompany where [ST] ='" & forms!frmMain!cboStates & "'"

The CO combo must be refreshed (cboCo.requery action) after user picks the state so it can deliver the resulting dataset.
If there is another combo after this say cboEmps to pick employees, then the cboEmp must be refreshed after user picks cboCo.

sub cboCo_AfterEvent()
cboEmps.requery
end sub
 
Upvote 0

Forum statistics

Threads
1,222,013
Messages
6,163,390
Members
451,834
Latest member
tomtownson

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top