# Access 2007 Query returns blank results



## Onlym (Feb 17, 2011)

I have Access 2007

I have tried to find the answer to this, but i have not found a simple answer. I have created a family business database ( i must state i am new to access) which works ok. I now want to run some queries but when i do they come back as blank fields. I guess its something to do with Relationships and Join Types, which i admit i dont fully understand Join Types

So not to mess up my database i created a simple 4 table database Table1, Table2, Table3 & Call.

I want to create a query from Call Table and add a field from each table Table1(LastName), Table2 (property), Table3(status). I will then set criteria on Status "Completed"










I suppose i need help on the correct way to join these tables together so the query works. Or you may say its something else.

Its probably something simple to someone.

Thanks


----------



## OBP (Mar 8, 2005)

OnlyM, welcome to the Forum.
Your relationships look good, but one tip is not to call all the key fields ID as that can confuse Access.
When you say the Query does not return any records, do all the tables have records in them?


----------



## Onlym (Feb 17, 2011)

Yes, I have something in every table. I have only given these names just for this test database, once i have worked it out i will hopefully then try it on my database i have created.

Onlym


----------



## OBP (Mar 8, 2005)

Do the records in all 3 tables have the correct Key field to subkey field in them.
ie table 1 ID has a matching record in Call, so does Table 2 & table 3?
Can you post a zipped copy in Access 2003 format, it does not need any data in it?


----------



## Onlym (Feb 17, 2011)

I have set a blank web page so you can download it. File size is 300kb Download HERE


----------



## OBP (Mar 8, 2005)

OK, your Call table does not have a record form Table 3, therefore if you delete table 3 the query will work.
To overcome this you change the Join properties in the Query, note that you have to change them all in the same fashion otherwise you will get an Unequal Join error.
See the attached database.


----------



## Onlym (Feb 17, 2011)

Your very good, i can see you have got table1 & table2 in the query but how do i now get table3 showing in the query. You mention about join properties, what would i need to do?

And thanks for your help so far.


----------



## OBP (Mar 8, 2005)

Table 3 is in the query, all you need to do is drag the fields that you want in to the body of the query, or click on an empty column heading, select the table and then the field form the drop down lists.


----------



## Onlym (Feb 17, 2011)

I did this before i made this post and I have just tried again what you said, by adding the field to the query but it shows up blank. What did you actually do to make table1 and table2 show?


----------



## OBP (Mar 8, 2005)

Does it show up blank because there is no data in it relating to the record in the main table?


----------



## Onlym (Feb 17, 2011)

Yes there is. If you look at the database i sent you you can see there is data in the status field which is what i want it to show.


----------

