synchronizing list with form

G

george

Hi guys,
I have a form, frmClients, with a command button on it
which opens another dialog form fdlgPolicies.
This second form contains a listbox, lstPolicies, which in
turn is based on an embedded query. Currently when I click
on my command button, fdlgPolicies opens but displays all
policies of all clients in the list box. I want it to
display only those policies which belong to the client
that I'm viewing on my frmClients. How can I synchronize
the two?
Any help will be appreciated.

ps: There is a field ClientID on my clients form, and
ClientID, PolicyN in the query behind the list box.
 
M

Marshall Barton

george said:
Hi guys,
I have a form, frmClients, with a command button on it
which opens another dialog form fdlgPolicies.
This second form contains a listbox, lstPolicies, which in
turn is based on an embedded query. Currently when I click
on my command button, fdlgPolicies opens but displays all
policies of all clients in the list box. I want it to
display only those policies which belong to the client
that I'm viewing on my frmClients. How can I synchronize
the two?
Any help will be appreciated.

ps: There is a field ClientID on my clients form, and
ClientID, PolicyN in the query behind the list box.


I think you can just add a criteria to the list box's
RowSource query. Under the Client ID field, use

Forms!frmClients.ClientID
 

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