Autofill ComboBox based on another Combo

mumbles10

Registered User.
Local time
Yesterday, 23:26
Joined
Feb 18, 2011
Messages
66
So I have a combobox with a 7 different options... I would like to autofill 4 bound combos with a specific value. I am not sure the SQL statement to handle it.

So far I have:

If [ThirdPartyID] <> "N/A" Then

cboJobBand.Rowsource = SELECT tblJobBands.JobBandID, tblJobBands.JobBandName FROM tblJobBands WHERE ((tblJobBands.JobBandName) = "3P"))

EndIF

Any suggestions?
 
Use;
Code:
Forms!YourFormName!YourMasterComboName
in the criteria of the query that is populating your cascaded combo. This will limit the records to only those related to the recorded currently selected in your Master Combo.
 
Use;
Code:
Forms!YourFormName!YourMasterComboName
in the criteria of the query that is populating your cascaded combo. This will limit the records to only those related to the recorded currently selected in your Master Combo.

So I am trying to write a code to say that If any other value in the Master Combo is chosen other then "N/A" Then populate Job Band ID combo with "3P". Which is a row in the underlying JobBand Table.

Not sure if your suggestion will work.
 
Check the attached sample.
I've cascaded to a list box instead of a combo, for clarity, the process is however exactly the same.
 

Attachments

Last edited:
Check the attached sample.
I've cascaded to a list box instead of a combo, for clarity, the process is however exactly the same.

JBB,

Thanks again... maybe I am being dense... however, what I need to happen... is if a user selects N/A from combo1... I need combo two to populate 3P. Which is a specific item in rowsource. I can get the box to populate the list no problem... I just can't get the combo2 to list that... The reason I am doing this is so the user can choose N/A and have it autofill a few boxes... If I can figure out to do the one I could get the rest of them as well.

Thanks again.
 

Users who are viewing this thread

Back
Top Bottom