Combo Selection Based on a Query

DubaiDave

Registered User.
Local time
Today, 05:15
Joined
Nov 25, 2008
Messages
69
With help from others on this board (thanks!) I have created a combo (1) whose RowSource is based on a query that uses the contents of another combo (2).

It works when you open the form (combo 2 has a default value), but does not work if another combo 2 value is selected by the User. It continues to work on the initial value set in combo 2.

Do I have to refresh something to tell combo 1 to go and look at the current value of combo 2?

Dave
 
If you have done something in a thread with someone's help and you have followup question(s) it is ussually smart to keep it all in one thread.

But since we are here...
Yes... if Combo1 changes you have to "requery" Combo2.
In the "after update" event of Combo one you have to "requery" Combo2.

If you get stuck, search the forum for "Cascading combobox" and you will find some samples which should show you exactly how to make this work

Good luck!
 
Namliam,

Take your point re Threads!

And a Big Thank You as your advise has solved by problem.

Don't suppose you could have a quick shifty at my 'Query to select a record with highest value' thread as I am getting nowhere with it.

Dave
 
Bob will come along and answer that one for you ;)

You will have to actually change that query from one (group by) to the other (no group by). I.e. make 2 queries, one grouped another not grouped and open the right query depending on if the checkbox is or isnt checked.
 

Users who are viewing this thread

Back
Top Bottom