Matching information from a query with another table (1 Viewer)

hazell

Registered User.
Local time
Today, 13:30
Joined
Jul 9, 2013
Messages
54
Morning All,
I have a database in which I have a table which I have called Young People and another which I have called Youth Provisions. I very foolishly set up my Youth Provisions table so that I could select the Young People who attended on a particular date from the list in Young People.
Hope this is clear so far
Now I need to be able to get the addresses of those Young People who attended Youth Provisions in the last quarter.
I have managed to write a query which lists all the individuals who attended.
Now I want to use that to write another one which takes those individuals and matches them against their details in the Young Person table.
Can you tell me how I might do this please. I have already realised that selecting Provision attendees from the list in another table was not the smartest choice but I am stuck with it for now until I can find time to change it.
Hope all this is relatively clear
thanks
 

CJ_London

Super Moderator
Staff member
Local time
Today, 21:30
Joined
Feb 19, 2013
Messages
16,723
Now I want to use that to write another one which takes those individuals and matches them against their details in the Young Person table.
by linking the individuals from your query to the young people table on their unique ID
 

hazell

Registered User.
Local time
Today, 13:30
Joined
Jul 9, 2013
Messages
54
Should have added that I set up a relationship between Young People.Name and the Youth Provision.Attendees. I thought that this would allow me to cross reference them, but the resulting query shows the names from the original query but none of the information held on the young persons table i.e. address, DOB etc is visible
 

CJ_London

Super Moderator
Staff member
Local time
Today, 21:30
Joined
Feb 19, 2013
Messages
16,723
matching on name is a bad idea, names change or are corrected.

If you have linked to the people table you should just need to drag down the relevant fields.

Might be an idea if you post a screenshot of your relationships plus the sql to your query(s)
 

hazell

Registered User.
Local time
Today, 13:30
Joined
Jul 9, 2013
Messages
54
When the query is returned with the list of attendees, what is actually being returned is the Young Person table with their name ticked in the list, if you know what I mean. So when I try to use that in a second query, it either returns nothing, or it returns the information for the whole of the table
 

CJ_London

Super Moderator
Staff member
Local time
Today, 21:30
Joined
Feb 19, 2013
Messages
16,723
don't understand what you mean. If you need help please provide a screenshot of your relationships and the sql to your queries
 

Users who are viewing this thread

Top Bottom