G
Guest
Can someone help me with this SQL line of code?
Dim strSQL As String
Dim lImporterID As Long
Dim strReference As String
strReference = Me.EntryCustomerReferenceNbr
lImporterID = Me.EntryImporterNbrID
strSQL = "SELECT Entry.* FROM Entry WHERE Entry.EntryCustomerReferenceNbr =
" & strReference & " AND Entry.EntryImporterNbrID = " & lImporterID
Set rs = DBEngine(0)(0).OpenRecordset(strSQL)
I need to select an Entry with 2 criteria but I get an error when I run the
application. The error I receive is Run-time error '3464': Data type
mismatch in criteria expression.
Any help is GREATLY appreciated!
Thanks so much!
Janis in Minne-SNOW-ta!
Dim strSQL As String
Dim lImporterID As Long
Dim strReference As String
strReference = Me.EntryCustomerReferenceNbr
lImporterID = Me.EntryImporterNbrID
strSQL = "SELECT Entry.* FROM Entry WHERE Entry.EntryCustomerReferenceNbr =
" & strReference & " AND Entry.EntryImporterNbrID = " & lImporterID
Set rs = DBEngine(0)(0).OpenRecordset(strSQL)
I need to select an Entry with 2 criteria but I get an error when I run the
application. The error I receive is Run-time error '3464': Data type
mismatch in criteria expression.
Any help is GREATLY appreciated!
Thanks so much!
Janis in Minne-SNOW-ta!
