Query Not returning all Reccords

lindseyaileen

New Member
Joined
Mar 2, 2015
Messages
8
I have been hunting trying to find the solution an I have tracked down the problem to be with the joins in my query but it keeps returning syntax errors when I try to change it. I need the table classes to be the main table for the query. I need to see all of those records and I just want the added information from Instructors and Locations when they are available.

here is my code

Code:
 SELECT Classes.CourseTitle, Classes.[YourU Description], Instructors.FirstName, Instructors.LastName, 
Classes.HoursOfInstruction, 
Classes.StartDate, Classes.EndDate, Classes.Sessions, Classes.StartTime, Classes.EndTime, Classes.ClassFee,
 Classes.Category.Value, 
Classes.[Course Type].Value, Classes.CourseDescription, Classes.NoDiscount,
 Locations.OffSite, Locations.LocationName,
 Locations.LocationAddress, Locations.City, Locations.Phone
FROM Locations INNER JOIN (Instructors INNER JOIN Classes 
ON Instructors.InstructorID = Classes.[Instructor ID]) 
ON (Locations.LocationID = Classes.LocationID) AND (Locations.LocationID = Classes.LocationID)

WHERE (((Classes.Status)="Run") AND ((Classes.Semester)=[Forms]![Main Menu]![TextSemester]));

Any help would be much appreciated.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
List your 'always' data first in the FROM statement, then do left join instead of inner join on the optional tables.
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,027
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top