Re-populating an open form with another query based on a combobox selection

tonycl69

Registered User.
Local time
Today, 18:35
Joined
Nov 14, 2012
Messages
53
Not sure which is the best wat to go here, I have one form amd two queries, the only difference between the two queries is a 6 weekly date and a 12 weekly date for inspecting vehicles. I have created a form based on the 6weekly query and all is fine, I use a combo box to filter all hgv's or all compressors or all vans etc which works fine. But when I select HGV I need the 6weekly query to run and when I select cars or vans etc I need the 12 weekly qury to run, is this possible or is there a way of combining the ywo queries to populate the form?
 
I would put a couple of lins of code in the After Update event of the combo box that would change the Record Source property of the form if "HGV" has been selected.
 
Ok I think I get the drift but not being fully converse with coding as yet, but i'm getting there, could you be a little bit more specific please.
 
If you can post a copy of your db (with some dummy data) in A2003 mdb format I will try to write the code for you.
 
Thanks for your reply, but after a few tweaks I have managed to combine the 2 queries so I have all the data I need for the form, however on a similar note, on my form I have 2 text boxes that are controlled by the 2 queries, both invisible, so I have a combo box that when a category is selected makes the relevent text box visible and conditional formatting makes it a certain colour, what I would like to do is when the form opens and when I clear the filter to have both text boxes visible and showing conditional formatting for the category data. Hope this makes sense. cheers.
 

Users who are viewing this thread

Back
Top Bottom