Refering List

D

DS

I have 2 Listboxes. When you choose an item in the first Listbox a
second Listbox pops-up. This works fine...except that I can't get the
second Listbox to bring up only the records that pretain to the orginal
Listbox. Heres the exprssion I'm using.

[Product Id]=[Forms]![Orders]![List4]

Is my expression wrong? I have it on the "where" part of the open form.
Thanks
DS
 
D

Dan Artuso

Hi,
Do you mean your 2nd listbox is on a seperate form?
Usually you would have them on the same form, but you can do it your
way.

You have to put the criteria on the query that feeds your 2nd listbox.
So put:
[Forms]![Orders]![List4]

as criteria for ProductId in your 2nd listbox's query.
Doing it this way though means that you can't ever open your 2nd listbox
form without the 1st listbox's form being open as well.
 
D

DS

Dan said:
Hi,
Do you mean your 2nd listbox is on a seperate form?
Usually you would have them on the same form, but you can do it your
way.

You have to put the criteria on the query that feeds your 2nd listbox.
So put:
[Forms]![Orders]![List4]

as criteria for ProductId in your 2nd listbox's query.
Doing it this way though means that you can't ever open your 2nd listbox
form without the 1st listbox's form being open as well.

--
HTH
Dan Artuso, Access MVP


DS said:
I have 2 Listboxes. When you choose an item in the first Listbox a
second Listbox pops-up. This works fine...except that I can't get the
second Listbox to bring up only the records that pretain to the orginal
Listbox. Heres the exprssion I'm using.

[Product Id]=[Forms]![Orders]![List4]

Is my expression wrong? I have it on the "where" part of the open form.
Thanks
DS
Thanks, the part I was missing was refering to List4 as opposed to
Product Id in the Query...once again, Thanks a Million.
DS
 

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