Correct syntax for Find By combo?

G

Guest

I have an Agents table and form, which is part of our international despatch
system.
These contain, among other things, fields and controls called AgtName and
AgtCtry.

At the moment we have a combo that drops down the complete list of agent
names, from which we select the one that is required and and go into that
record.

Now we want to be able to search by country, and see which agents are
available, and make a selection from there. So I guess we would have a combo
that would firstly display all the AgtCtry values (sorted ascending) and then
in a second column it would show all the AgtNames against each country.

How would I do that (and is that the best way to achieve what we want - i.e.
to find an agent by country?)

Many thanks
CW
 
G

Guest

You can use the AfterUpdate event of the AgtCtry combo to set the
RecordSource of the AgtName combo.

In this event, you should first check that a value has in fact been selected
before setting the other combo's recordsource.

If you need help with the code to do that, post back with the field names in
your AgtCtry and AgtName tables.

Steve
 
G

Guest

Thanks, Steve, I've got it working now

SteveM said:
You can use the AfterUpdate event of the AgtCtry combo to set the
RecordSource of the AgtName combo.

In this event, you should first check that a value has in fact been selected
before setting the other combo's recordsource.

If you need help with the code to do that, post back with the field names in
your AgtCtry and AgtName tables.

Steve
 

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