I have the following SQL that works fine...
However, if I create loops to cycle thru the years, the following doesn't work?
Is CStr not right?
Code:
= "SELECT [ID] FROM [Data Connection TBL] WHERE ([DateSentYear]= ""1992"" AND [DateRcvdYear]= ""1992"");"
Code:
= "SELECT [ID] FROM [Data Connection TBL] WHERE ([DateSentYear]= " & CStr(x) & " AND [DateRcvdYear]= " & CStr(y) & ");"
Is CStr not right?