M
Mike Green
Hi All
Please could someone let me know the correct syntax for adding a text string
requirement for the sql statement below. Or am I going about this the wrong
way? This is a button on a form so that the user can click it to show all
the records with the stated.
Thanks in advance.
Mike
StrSQLAllveh = "SELECT TblJobCard.FdJobCardID, TblJobCardJobs.FdJobType," &
_
"TblJobCardJobs.FdJobCardJobDescription, TblJobCard.FdJobCardCloseDate,
TblJobCard.FdVRN, " & _
"TblJobCard.FdJCNumberText, TblJobCard.FdCustomerID, TblJobCard.FdMotin,
TblJobCard.FdMOTinDate " & _
"FROM TblJobCardJobs RIGHT JOIN TblJobCard ON TblJobCardJobs.FdJobCardID
= TblJobCard.FdJobCardID " & _
"WHERE (((TblJobCardJobs.FdJobType)= " & "Carry Out Annual MOT" & " )" &
_
"AND ((TblJobCardJobs.FdJobCardJobDescription)= " & "MOT" & ") AND
((TblJobCard.FdJobCardCloseDate)<Date()-330));"
Please could someone let me know the correct syntax for adding a text string
requirement for the sql statement below. Or am I going about this the wrong
way? This is a button on a form so that the user can click it to show all
the records with the stated.
Thanks in advance.
Mike
StrSQLAllveh = "SELECT TblJobCard.FdJobCardID, TblJobCardJobs.FdJobType," &
_
"TblJobCardJobs.FdJobCardJobDescription, TblJobCard.FdJobCardCloseDate,
TblJobCard.FdVRN, " & _
"TblJobCard.FdJCNumberText, TblJobCard.FdCustomerID, TblJobCard.FdMotin,
TblJobCard.FdMOTinDate " & _
"FROM TblJobCardJobs RIGHT JOIN TblJobCard ON TblJobCardJobs.FdJobCardID
= TblJobCard.FdJobCardID " & _
"WHERE (((TblJobCardJobs.FdJobType)= " & "Carry Out Annual MOT" & " )" &
_
"AND ((TblJobCardJobs.FdJobCardJobDescription)= " & "MOT" & ") AND
((TblJobCard.FdJobCardCloseDate)<Date()-330));"