filling a listbox

G

Guest

Hello. This is a rather easy issue but I am having an old age moment and not
figuring it out. I have a many to many table (tblClientJurisdiction) coming
from tblClient and tblJurisdiction. My dilemma comes from the form I use to
populate tblClientJurisdiction. After selecting the Client and all the
jurisdictions a button click places the info on the table. That all works
fine. What the end users are wanting is to see the selected jurisdictions
appear in a listbox on the same form that is used to select the jurisdictions
(mainly for peace of mind). That is the dilemma I am having. How do I have
the selected jurisdictions appear in a listbox? Whatever is done can be part
of the button click event if possible.
Thanks to anyone responding.
*** John
 
T

tina

well, if you have a listbox on the form, with the RowSource set to
tblClientJurisdiction, with a criteria on the ClientID field (or whatever is
the name of the foreign key field that links back to tblClient) of

Forms!FormName!ClientID

(again, ClientID being whatever is the name of the primary key field in the
current Client record in the form), then in the button click, after the
action(s) that add the jurisdictions to tblClientJurisdiction, just add code
to requery the listbox, as

Me!NameOfListbox.Requery

hth
 
G

Guest

Tina, got it to work. Thanks.
*** John



tina said:
well, if you have a listbox on the form, with the RowSource set to
tblClientJurisdiction, with a criteria on the ClientID field (or whatever is
the name of the foreign key field that links back to tblClient) of

Forms!FormName!ClientID

(again, ClientID being whatever is the name of the primary key field in the
current Client record in the form), then in the button click, after the
action(s) that add the jurisdictions to tblClientJurisdiction, just add code
to requery the listbox, as

Me!NameOfListbox.Requery

hth
 

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