A
Aria
Hello,
I was wondering if someone could help me with my query. I am creating a db
to track keys and employee info for our school. I am trying to create a
report for summer school. While I will still be working during the first
session of summer school, all regular year employees will be on break when
the second session begins and will not return until after that session ends.
Therefore, the administrative team will be responsible for ensuring that all
of the keys are returned by the summer school personnel. Since the keys
belong to our regular staff, the summer school staff will need to be
contacted if they fail to return our inventory.
Since it is way too early for summer school, I am trying to create my report
using test data. This is the query I have come up with but I receive the
following error message:
Data type mismatch in criteria expression
I looked in the Help section and for similar issues in the forum. DateIssued
and DateRtrnd are date/time fields; AllowedtoRetain is a yes/no field (tried
changing "False" to "No" but has the same error message).
The SQL is:
SELECT tblEmployees.EmpID, tblEmployees.FirstName, tblEmployees.LastName,
tblEmployees.HomePhone, tblEmployees.CellPhone, tblKeyAssignments.KeyID,
tblKeys.KeyCode, tblKeyAssignments.DateIssued, tblKeyAssignments.DateRtrnd,
tblTitles.TitleID, tblTitles.TitleDescription,
tblKeyAssignments.AllowedToRetain
FROM tblTitles, tblKeys INNER JOIN (tblEmployees INNER JOIN
tblKeyAssignments ON tblEmployees.EmpID = tblKeyAssignments.EmpID) ON
tblKeys.KeyID = tblKeyAssignments.KeyID
WHERE (((tblKeyAssignments.DateIssued)>#1/15/2009#) AND
((tblKeyAssignments.DateRtrnd)="Is Null") AND
((tblKeyAssignments.AllowedToRetain)=False));
Can someone please tell me what I'm overlooking?
I was wondering if someone could help me with my query. I am creating a db
to track keys and employee info for our school. I am trying to create a
report for summer school. While I will still be working during the first
session of summer school, all regular year employees will be on break when
the second session begins and will not return until after that session ends.
Therefore, the administrative team will be responsible for ensuring that all
of the keys are returned by the summer school personnel. Since the keys
belong to our regular staff, the summer school staff will need to be
contacted if they fail to return our inventory.
Since it is way too early for summer school, I am trying to create my report
using test data. This is the query I have come up with but I receive the
following error message:
Data type mismatch in criteria expression
I looked in the Help section and for similar issues in the forum. DateIssued
and DateRtrnd are date/time fields; AllowedtoRetain is a yes/no field (tried
changing "False" to "No" but has the same error message).
The SQL is:
SELECT tblEmployees.EmpID, tblEmployees.FirstName, tblEmployees.LastName,
tblEmployees.HomePhone, tblEmployees.CellPhone, tblKeyAssignments.KeyID,
tblKeys.KeyCode, tblKeyAssignments.DateIssued, tblKeyAssignments.DateRtrnd,
tblTitles.TitleID, tblTitles.TitleDescription,
tblKeyAssignments.AllowedToRetain
FROM tblTitles, tblKeys INNER JOIN (tblEmployees INNER JOIN
tblKeyAssignments ON tblEmployees.EmpID = tblKeyAssignments.EmpID) ON
tblKeys.KeyID = tblKeyAssignments.KeyID
WHERE (((tblKeyAssignments.DateIssued)>#1/15/2009#) AND
((tblKeyAssignments.DateRtrnd)="Is Null") AND
((tblKeyAssignments.AllowedToRetain)=False));
Can someone please tell me what I'm overlooking?