Populate list box

yippie_ky_yay

Registered User.
Local time
Yesterday, 22:26
Joined
Jul 30, 2002
Messages
338
Hello forum,

I'm close on this I think!

Thus far I have a Person_Info table and a Group_Info table - so a PersonID is the link between the two (1 person may belong to many groups).

Basicly, on my form which shows you all the info from Person_Info table, I'd like to have a button which will list all the groups that the currently shown PersonID belongs to. I know how to make a dynamic query (ie prompt for PersonID which will return all Group_Names for that person) - but how do make it so that it won't prompt me for the PersonID, rather, it will retrieve it from the record currently being displayed.

Of course, if there's a better alternative, I'd love to know about that too. Any help would be greatly appreciated!

-Sean
 
Their must be a query in your db some where.

Open it in design view.

In the person-Id field "Criteria" put some thing like:-

Forms!WhateverYourFormNameIs!WhateverYourFieldNameIs

Now if you run the query from the main form containing the Person_ID you want to show, the parameter dialog shouldn't fire and the query will filter on the current ID showing.

Dave
 
You're good DW!

Works great - Thank you!
 

Users who are viewing this thread

Back
Top Bottom