synchronizing combo boxes

G

Guest

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];
Someone suggested that I should incorporate in my AfterUpdate event of Combo1 this line of code Me!combo2.Requery.
Again the problem still persist. I works for the 1st two combo boxes and not for the third.
Hopefully this does not sound too confusing.
Sorry to be such a hassle but some help would really be appreciated.
Thanks in advance

G.
 
S

Sandra Daigle

Hi G,

What is the SQL in qry_Combox2? Presumably it has a where clause which
refers to Forms!frmName!combox2. Also, in the AfterUpdate event of Combox2
you should be requerying Combox3.

If this doesn't help post your code for the AfterUpdate events of Combox1
and Combox2 and the SQL behind the queries for the 2nd and 3rd combos.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
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];

Someone suggested that I should incorporate in my
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top