Hi Community,
Looking for some help in solving a problem. I am getting back a NULL (no records it seems) when processing this query in VBA, but when i try it similarly in Acess it works the way it's supposed to. Not sure what i am doing wrong here. Any help would be appreciated.
VBA SQL String:
This returns NULL and i get a error saying "Invalid Use of Null" when trying to insert this into a message box using the RecordSet.Fields.(0).Value
Here is the MS Access Equivalent that returns a value
Looking for some help in solving a problem. I am getting back a NULL (no records it seems) when processing this query in VBA, but when i try it similarly in Acess it works the way it's supposed to. Not sure what i am doing wrong here. Any help would be appreciated.
VBA SQL String:
VBA Code:
lastStatDate = "SELECT LAST(q.[Stat Date]) FROM QC_Data AS q WHERE q.[Stat Date] LIKE '" & "5*" & "'"
This returns NULL and i get a error saying "Invalid Use of Null" when trying to insert this into a message box using the RecordSet.Fields.(0).Value
Here is the MS Access Equivalent that returns a value
VBA Code:
SELECT LAST(q.[Stat Date]) FROM QC_Data AS q WHERE q.[Stat Date] LIKE "5*"