Refreshing Form Data

JerrodConaway

Registered User.
Local time
Today, 02:54
Joined
Feb 15, 2007
Messages
11
I have created a form with the following combo boxes: Senator Name, Committee, SubCommittee, and issue. Within this form the data displayed by the SubCommittee combo box is predicated by what is entered in the Committee box by using the following formula:

SELECT SenateSubcommittee.SSC_Name, SenateMainCommittee.SMC_Name FROM SenateSubcommittee INNER JOIN SenateMainCommittee ON SenateSubcommittee.SSC_SMC_Abbreviation=SenateMainCommittee.SMC_Abbreviation WHERE (((SenateMainCommittee.SMC_Name)=Forms!Search!cmbCommittees1));

Unfortunately, if I mistakenly select one Committee and then change it to another Committee, the Subcommittee will only display results from the first committee I selected. For example, if I mistakenly select the Energy and Natural Resources Committee, but then change it to Appropriations, the subcommittee will only display the subcommittees related with Energy and Natural Resources. The only way to correct this is to close and reopen the form.

Any suggestions?
 
take a look at cascading combo boxes. there are many many many threads on this

also you need to requery the boxes based on the selection of the first one. in the onchange event or afterupdate event
 
I did a search, but I honestly do not know what I am looking for. I tried to create a macro for OnChange where CmbSenateSubcommittees (the second combo box) would requery CmbCommittees1, but that did not do anything. Is there a built in function to create a cascading combo box? If so where?
 
no, but there is a function, no macro needed, in the event procedure of the combo box called onChange.

in that is where u would do me.cmbcommittees1.requery
 

Users who are viewing this thread

Back
Top Bottom