combo box with query as data source

G

Guest

Hi all, I get stucked on the following.

I have a form for data input where there are two combo box .

1st combo box is to input customer code (from Customer Query)
2nd combo box is to input Merchandiser name (from Merchandiser Query, using
the input at 1st combo box as the criteria)

The problem come when:
I enter a customer code for 1st combo box, say ABC
Then I move to the 2nd combo box which display a list of merchandiser
working for ABC company, say Simon, Peter, Mary etc.
Then I find the company is wrong so I go back to 1st combo box to correct it
to XYZ.
Then I go the the 2nd combo box to expect a revised merchandiser list of XYZ
company,
but the list is still those of ABC Company,
i.e., the underlying query still refers ABC, not the new one.

So my question is how to make the 2nd combo box to response to change of
data in 1st combo box and revise the merchandiser list from ABC company to
XYZ company?

Grateful if someone can help me to sort it out.

Best regards
Simon Wong
 
J

Jeff Boyce

Simon

If your second combo box gets requeried after a change in the first combo
box, it should be displaying the Merchandisers related to the first combo
box's choice.

Are you using the AfterUpdate event in your first combo box to requery the
second?
 
G

Guest

Hi Jeff

So I go to the property sheet of 1st combo box
Go to the Event page
At the "After-update" event
I creat a macro to conduct a "requery" action
On the argument box I put the name of the 2nd combo box

After the above is done I found the pull down list under the 2nd combo box
can now refresh itself whenever the test in the 1st combo box changes.
So my problem is solved.
Thank you for your kind help.


Best regards
Simon Wong
 

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