trying to relearn Access

P

Peggy Rowe

Hello, I am trying to relearn access. And I get to start by trying to
create a report that finds the volunteers, that work certain events,
and their shifts.

I have started by making a query to base the report on. The code for
the query is below. I keep getting a JOIN syntax error. I went out
and bought Access 2003 Step by Step by Microsoft, and it doesn't even
talk about JOIN. Arggh!!! Help me, Please... thanks Peggy


SELECT [tblVolunteers].[LastName], [tblVolunteers].[FirstName],
[tblEvents].[EventName], [tblShifts].[StartTime]
FROM (tblEvents LEFT JOIN (tblEventTasks LEFT JOIN tblShifts ON
([tblEventTasks].[TaskID] =[tblShifts].[TaskID]) AND
([tblEventTasks].[EventID] =[tblShifts].[EventID])) ON
[tblEvents].[EventID] =[tblEventTasks].[EventID]) LEFT JOIN
tblVolunteers ON ([tblEvents].[EventID] =[tblVolunteers].[DayPhone])
AND ((([tblEvents].[EventID] =[tblVolunteers].[LastName]) AND
([tblEvents].[EventID] =[tblVolunteers].[FirstName])) AND
([tblEvents].[EventID] =[tblVolunteers].[SpouseName]));
 
L

Lynn Trapp

Peggy,
Tables need to be joined on fields that are of the same data type and, in
your case, that are equal. I have a hard time seeing how all the following
expressions call be true at the same time:

[tblEvents].[EventID] =[tblVolunteers].[DayPhone]
[tblEvents].[EventID] =[tblVolunteers].[LastName]
[tblEvents].[EventID] =[tblVolunteers].[FirstName]
[tblEvents].[EventID] =[tblVolunteers].[SpouseName]

In fact, I doubt very seriously whether or not ANY of them will ever be
equal, as it is likely that [tblEvents].[EventID] is a numeric field and the
other fields from tblVolunteers are probably text fields.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top