L
Loggical via AccessMonster.com
I have query that I am trying to filter using two particular fields; one of
these fields is a Check Box. The query is based on three separate tables
joined by an ID Field on each table.
The problem is when I run the query with the Check Box (Criteria = No) it
doesn’t return all the records it should; only returns two records. I have
checked the underlying tables and it should return some 50+ records. By not
having the Check Box in the same query it returns all the required records,
it should. By setting the (Criteria = Yes) it also returns all the required
records. For some reason it’s just when the (Criteria = No) The query is
updatable.
The SQL for both of the tables are.
Without check box
SELECT tblVFRIssued.VFRIssuedID, tblVFRIssued.VFRIssuedTo, tblVFRIssued.
VFRIssuedDate, tblVFRIssued.VFRIssuedTime, tblVFRIssued.VFRIssuedTitle,
tblVFRIssued.VFRDVDIssued, tblVFRIssued.VFRDVDIssuedSurveillance,
tblVFRIssued.VFRPersonIssued, tblVFRRetrieved.VFRRetrievedID, tblVFRRetrieved.
VFRRetrievedDate, tblVFRRetrieved.VFRRetrievedTime, tblVFRRetrieved.
VFRRetrievedYesNo, tblVFRRetrieved.VFRDVDRetrieved, tblVFRRetrieved.
VFRDVDRetrievedSurv, tblVFRRetrieved.VFRPersonRetrieved, tblVFRDisposed.
VFRDisposedID, tblVFRDisposed.VFRDateDisposed, tblVFRDisposed.VFRTimeDisposed,
tblVFRDisposed.VFRDisposedYesNo, tblVFRDisposed.VFRDVDDisposed,
tblVFRDisposed.VFRDVDSurveillance, tblVFRDisposed.VFRPersonDisposed
FROM (tblVFRIssued LEFT JOIN tblVFRRetrieved ON tblVFRIssued.VFRIssuedID =
tblVFRRetrieved.VFRRetrievedID) LEFT JOIN tblVFRDisposed ON tblVFRRetrieved.
VFRRetrievedID = tblVFRDisposed.VFRDisposedID
WHERE (((tblVFRIssued.VFRIssuedTo)=[Enter the Office]));
With Check Box
SELECT tblVFRIssued.VFRIssuedID, tblVFRIssued.VFRIssuedTo, tblVFRIssued.
VFRIssuedDate, tblVFRIssued.VFRIssuedTime, tblVFRIssued.VFRIssuedTitle,
tblVFRIssued.VFRDVDIssued, tblVFRIssued.VFRDVDIssuedSurveillance,
tblVFRIssued.VFRPersonIssued, tblVFRRetrieved.VFRRetrievedID, tblVFRRetrieved.
VFRRetrievedDate, tblVFRRetrieved.VFRRetrievedTime, tblVFRRetrieved.
VFRRetrievedYesNo, tblVFRRetrieved.VFRDVDRetrieved, tblVFRRetrieved.
VFRDVDRetrievedSurv, tblVFRRetrieved.VFRPersonRetrieved, tblVFRDisposed.
VFRDisposedID, tblVFRDisposed.VFRDateDisposed, tblVFRDisposed.VFRTimeDisposed,
tblVFRDisposed.VFRDisposedYesNo, tblVFRDisposed.VFRDVDDisposed,
tblVFRDisposed.VFRDVDSurveillance, tblVFRDisposed.VFRPersonDisposed
FROM (tblVFRIssued LEFT JOIN tblVFRRetrieved ON tblVFRIssued.VFRIssuedID =
tblVFRRetrieved.VFRRetrievedID) LEFT JOIN tblVFRDisposed ON tblVFRRetrieved.
VFRRetrievedID = tblVFRDisposed.VFRDisposedID
WHERE (((tblVFRIssued.VFRIssuedTo)=[Enter the Office]) AND ((tblVFRRetrieved.
VFRRetrievedYesNo)=No));
Any help would be greatly appreciated.
these fields is a Check Box. The query is based on three separate tables
joined by an ID Field on each table.
The problem is when I run the query with the Check Box (Criteria = No) it
doesn’t return all the records it should; only returns two records. I have
checked the underlying tables and it should return some 50+ records. By not
having the Check Box in the same query it returns all the required records,
it should. By setting the (Criteria = Yes) it also returns all the required
records. For some reason it’s just when the (Criteria = No) The query is
updatable.
The SQL for both of the tables are.
Without check box
SELECT tblVFRIssued.VFRIssuedID, tblVFRIssued.VFRIssuedTo, tblVFRIssued.
VFRIssuedDate, tblVFRIssued.VFRIssuedTime, tblVFRIssued.VFRIssuedTitle,
tblVFRIssued.VFRDVDIssued, tblVFRIssued.VFRDVDIssuedSurveillance,
tblVFRIssued.VFRPersonIssued, tblVFRRetrieved.VFRRetrievedID, tblVFRRetrieved.
VFRRetrievedDate, tblVFRRetrieved.VFRRetrievedTime, tblVFRRetrieved.
VFRRetrievedYesNo, tblVFRRetrieved.VFRDVDRetrieved, tblVFRRetrieved.
VFRDVDRetrievedSurv, tblVFRRetrieved.VFRPersonRetrieved, tblVFRDisposed.
VFRDisposedID, tblVFRDisposed.VFRDateDisposed, tblVFRDisposed.VFRTimeDisposed,
tblVFRDisposed.VFRDisposedYesNo, tblVFRDisposed.VFRDVDDisposed,
tblVFRDisposed.VFRDVDSurveillance, tblVFRDisposed.VFRPersonDisposed
FROM (tblVFRIssued LEFT JOIN tblVFRRetrieved ON tblVFRIssued.VFRIssuedID =
tblVFRRetrieved.VFRRetrievedID) LEFT JOIN tblVFRDisposed ON tblVFRRetrieved.
VFRRetrievedID = tblVFRDisposed.VFRDisposedID
WHERE (((tblVFRIssued.VFRIssuedTo)=[Enter the Office]));
With Check Box
SELECT tblVFRIssued.VFRIssuedID, tblVFRIssued.VFRIssuedTo, tblVFRIssued.
VFRIssuedDate, tblVFRIssued.VFRIssuedTime, tblVFRIssued.VFRIssuedTitle,
tblVFRIssued.VFRDVDIssued, tblVFRIssued.VFRDVDIssuedSurveillance,
tblVFRIssued.VFRPersonIssued, tblVFRRetrieved.VFRRetrievedID, tblVFRRetrieved.
VFRRetrievedDate, tblVFRRetrieved.VFRRetrievedTime, tblVFRRetrieved.
VFRRetrievedYesNo, tblVFRRetrieved.VFRDVDRetrieved, tblVFRRetrieved.
VFRDVDRetrievedSurv, tblVFRRetrieved.VFRPersonRetrieved, tblVFRDisposed.
VFRDisposedID, tblVFRDisposed.VFRDateDisposed, tblVFRDisposed.VFRTimeDisposed,
tblVFRDisposed.VFRDisposedYesNo, tblVFRDisposed.VFRDVDDisposed,
tblVFRDisposed.VFRDVDSurveillance, tblVFRDisposed.VFRPersonDisposed
FROM (tblVFRIssued LEFT JOIN tblVFRRetrieved ON tblVFRIssued.VFRIssuedID =
tblVFRRetrieved.VFRRetrievedID) LEFT JOIN tblVFRDisposed ON tblVFRRetrieved.
VFRRetrievedID = tblVFRDisposed.VFRDisposedID
WHERE (((tblVFRIssued.VFRIssuedTo)=[Enter the Office]) AND ((tblVFRRetrieved.
VFRRetrievedYesNo)=No));
Any help would be greatly appreciated.