This error keeps popping up from time to time and for the life of me I can't see where it's coming from. I have parameters passed to the SQL in the form of string variables so I don't see the problem. Any help with this would be greatly appreciated. It seems a simple enough SQL statement. Just returning a record from which I want to use the fields' values. Thanks in advance.
Code:
strWorkOrderKey = "123456V"
strNetwork = "BUT50"
strLocNum = "84-26"
strLocationID = "1234567890123456"
strSQL = "select * from wo1 w, wov001 wv " & _
"where w.wo1_key = wv.wo1_ptr " & _
"and w.wo1_key = '" & strWorkOrderKey & "' " & _
"and w.code = '" & strNetwork & "' " & _
"and w.location = '" & strLocNum & "' " & _
"and w.locationid = '" & strLocationID & "'"
set rsWO = CurrentDB.OopenRecordset(strSQL, dbOpenSnapshot)