I have a list of people in a list box and when I select someone in the list box I want however many addresses that person has in another list box or sub form. What is the best way to set this up?
I was trying to do this by having a query that got the unique identifier that matches the tables but when I tried to pass the parameter it didnt do anything, just displayed a blank query .... the code is:
PARAMETERS [Forms]![MainForm]![lstPeople]![Column(0)] IEEEDouble;
SELECT Addresses.AdrID, Addresses.PID, Addresses.Address, Addresses.City, Addresses.State, Addresses.ZipCode
FROM Addresses
WHERE (([PID] = [Forms]![MainForm]![lstPeople]![Column(0)]));
Then I was going to try to set another list box to get its row source from the query. This didnt work the way I wanted, am I on the right track or way off?