synchronizing three combo boxes!!

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_combo
3rd box Row Source Type = Table/Query, RowSource = qry_combox
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 advanc

G
 
G

Guest

Hi: It's me yet once again. I have read the article like you have suggested, made the modifications but still it doesn't work. My query is pretty much like the one in the article, I also
included in the AfterUpdate sub Me!combo2.Requery.

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

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];

Once again thanks for all your help but do u have any idea what I am doing wrong???

G.
 
J

Joan Wild

What is the sql for qry_combox2?

--
Joan Wild
Microsoft Access MVP

G said:
Hi: It's me yet once again. I have read the article like you have
suggested, made the modifications but still it doesn't work. My query is
pretty much like the one in the article, I also
included in the AfterUpdate sub Me!combo2.Requery.

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

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];

Once again thanks for all your help but do u have any idea what I am doing wrong???

G.
 
G

Guest

hi there, the query is pretty much the same as the other queries except takes info from other tables.
SELECT DISTINCTROW [tbl3].[field1], [tbl3].[field2]
FROM [tbl3]
WHERE ((([tbl3].[field3])=[Forms]![frmName]![combox2]))
ORDER BY [tbl3].[field2];
 

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

Similar Threads


Top