A
Afrosheen via AccessMonster.com
Thanks for taking the time to read this. The help I've gotten here has been
invaluable.
I'm trying to create a query that will show records greater than DateAdd
("yyyy", -3, Date()). Any thing prior to this year - 3 we don't need to see.
What I have for the query is:
select DateAch & _
FROM [qryTapsArchived] & _
WHERE [DateAch] > DateAdd("yyyy", -3, Date()) & _
AND YesNoField <> 0
The DateArch is a field in the qryTapsArchived query. The yes/no field is =
to true. The error I'm getting is that it keeps asking for is: Expected Case.
This SQL statement is from the query its self and seems to work in the query,
but not in the VBA version:
SELECT tblTaps.StaffId, tblMain.Lname, tblMain.Fname, tblTaps.WorkPlan,
tblTaps.WorkRec, tblTaps.IntDue, tblTaps.IntRec, tblTaps.FinalDue, tblTaps.
FinalRec, tblTaps.RatingCyc, tblTaps.FiscalYr, tblTaps.Rating, tblTaps.Notes,
tblTaps.Archive, tblMain.IdPict, tblTaps.DateAch, FROM tblMain INNER JOIN
tblTaps ON tblMain.StaffId = tblTaps.StaffId,
WHERE (((tblTaps.Archive)=True) AND ((tblTaps.DateAch)>DateAdd("yyyy",-3,Date
())))
invaluable.
I'm trying to create a query that will show records greater than DateAdd
("yyyy", -3, Date()). Any thing prior to this year - 3 we don't need to see.
What I have for the query is:
select DateAch & _
FROM [qryTapsArchived] & _
WHERE [DateAch] > DateAdd("yyyy", -3, Date()) & _
AND YesNoField <> 0
The DateArch is a field in the qryTapsArchived query. The yes/no field is =
to true. The error I'm getting is that it keeps asking for is: Expected Case.
This SQL statement is from the query its self and seems to work in the query,
but not in the VBA version:
SELECT tblTaps.StaffId, tblMain.Lname, tblMain.Fname, tblTaps.WorkPlan,
tblTaps.WorkRec, tblTaps.IntDue, tblTaps.IntRec, tblTaps.FinalDue, tblTaps.
FinalRec, tblTaps.RatingCyc, tblTaps.FiscalYr, tblTaps.Rating, tblTaps.Notes,
tblTaps.Archive, tblMain.IdPict, tblTaps.DateAch, FROM tblMain INNER JOIN
tblTaps ON tblMain.StaffId = tblTaps.StaffId,
WHERE (((tblTaps.Archive)=True) AND ((tblTaps.DateAch)>DateAdd("yyyy",-3,Date
())))