raychuck
04-09-2002, 10:17 AM
Having 2 unbound combo boxs on a form, I want the query on the 2nd combo box to reflect what was choosen on the first combo box. For instance if I have a table where there is a group type and group name, when I use the 2nd combo box, I only want the group names for the group type that was selected in the first combo box. I have tried setting the criteria for the 2nd combo query to say something like this: [forms]![formName]!
[Combo1] where Combo1 selects the group type.
Any help you can give me will be very much appreciated :-)
Elana
04-09-2002, 10:27 AM
Set your second combo box's Row source to:
SELECT "field1, field2, etc." FROM "yourtable" WHERE "ID of record in yourtable" = forms!frmYourForm!combobox1 ORDER BY "whatever sort order you want";
[This message has been edited by Elana (edited 04-09-2002).]
pbuethe
04-16-2002, 09:52 AM
Thanks Elana. I had the same problem and this solved it.
raychuck
04-16-2002, 11:44 AM
Thanx for your reply. Ummmm . . . it works but now I have a different problem. After I use the second combo box which queries correctly now based on the first combo box, when I tab back to the first combo box and change the value there, the 2nd combo box still reflects the query based on the previous value in the first combo box. Do I have to do some type of re-query action?
Thanx for your patience :-)
On the AfterUpdate event of the 1st combo do Me.[2ndcomboname].requery
raychuck
04-17-2002, 05:03 AM
That makes alot of sense. Thank you !