I have a string with multiple and cannot get it to work. It will work with any two of the criteria but not the third. I have tried so many different ways. What am I missing?
Dim sLoadLoc as String
Dim sLoadNum as Variant
Dim sLoadLine as Variant
sLoadNum = Forms![frm_bol_hed]![txt_loadNum]
sLoadLoc = Forms![frm_bol_hed]![txt_loc]
sLineNum = Me.LD_DET_LINE
strSQL = "select * from TBL_LOAD_DET where [LD_DET_LOC] = '" & sLoadLoc & "' And [LD_DET_LINE] =" & sLineNum And [LD_DET_NUM] = " & sLoadNum"
Set rs = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)