Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh a Subform after clicking a Combo Box 1

Status
Not open for further replies.

mattelhart

Technical User
Sep 13, 2006
3
I have a subform which contains 2 combo boxes. The second combo box's source is dependant on the preceding combo box This is the row source code for combo2

SELECT Table2.Column2, Table2.Column1 FROM Table2 WHERE (((Table2.Column1)=Combo1));

This code works fine if I run it from the main form but not when I run it from a subform. The problem is that the whichever Combo1 I select first becomes the row source for all Combo2 boxes until I close and reopen the main form. I can slect Refresh from the Records menu after each update and it will fix the problem but how can I do this with VBA code? I've been messing with Requery but am not having much luck. Any ideas? Thanks.
 
See Combo Box - dependant on another Combo Box
faq702-4289


Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top