Synchronizing 3 Combo boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there it's me again. I have been trying to synchronize 3 combo boxes.
the 2nd combobox depends on results from the 1st one, and the 3rd combo box depends on results based on results from the 2nd combo box. the first 2 work, but the 3rd does not.
I know the problem has to do with how I am using the Row Source property. For the first box
i have Row Source Type = Table/Query, RowSource = tbl_one.
2nd box Row Source Type = Table/Query, RowSource = qry_combox
3rd box Row Source Type = Table/Query, RowSource = qry_combox2
The queries basically display the values onto the next box depending on the selected item from the previous combo box.
for example the qry_combox is as follow:
SELECT DISTINCTROW [tbl_two].[field], [tbl_two].[field2]
FROM [tbl_two]
WHERE ((([tbl_two].[field3])=[Forms]![frmName]![combox1]))
ORDER BY [tbl_two].[field2];
By theory I know that I have to call the AfterUpdate event and take the current field from the 2nd combo box and connect it to the third one. But I am having trouble on how to write the code.
Hopefully this does not sound too confusing.
Any help would really be appreciated.
Thanks in advance

G.
 
By theory I know that I have to call the AfterUpdate event and take the current field from the 2nd combo box and connect it to the third one. But I am having trouble on how to write the code.

You don't "call" the AfterUpdate event - Access calls it automatically
every time the user selects a record from the combo box.

The AfterUpdate event of Combo1 should contain a code like

Private Sub combo1_AfterUpdate
Me!combo2.Requery
End Sub

and similarly for Combo2.
 
Hi John, thanks again for all your help, but again I have implemented what you suggested and the same problem still occurs, it works for the first two combo boxes and not for the third one. Any suggestions??


G
 
Back
Top