Query with data from multiple tables not working...

Johnsonsimon

Registered User.
Local time
Today, 21:27
Joined
May 5, 2012
Messages
45
Hello all,

The database is for a booking system for a chauffeur company. I am trying create a query that shows all the completed jobs or cancelled jobs.

The table layout might be a bit complicated to explain so I will post a screen grab of my relationships diagram.

Basically the query I am making is based on the tbl_Job, the Criteria is that the Completed field is 'True'. In this standard state it works absolutely fine. It is when I turn this standard query into a multitable query that it starts to go wrong.
The fields from the other tables are informational. Basically the Job table has many foreign keys which link to the primary keys in the other table where the data is stored (Such as Vehichle Desriptions, or Driver Names etc...)
I am able to add 2 additional table to the standard query (CLIENTS and PASSENGERS), but when I add any other the query simply doesnt display any results. I initially thought it was due to some of the records not containing some of the data, but I have tested this by adding records with every field completed and still have the same issue.

I cannot understand why it cant display the required data. I have a form called frm_Jobs that basically has a select query that pulls the same data but without the 'Criteria' and that works fine.

I have read about that this could have something to do with JOIN states? but this is over my head. If anyone can help it would be much appreciated.
 

Attachments

  • Screen Shot 2012-08-17 at 19.09.01.jpg
    Screen Shot 2012-08-17 at 19.09.01.jpg
    76.1 KB · Views: 131
Check the "Join Properties" for the joins you have between your tables. The default "join type" is "Only include rows where the joined fields from both tables are equal". It may be that you do not have all of the fields in the tbl_Job table populated with data for one or more of the fields where the tables are linked. This would cause no records to be displayed.
 

Users who are viewing this thread

Back
Top Bottom