Hi,
I get the following error when I open a record set:
Run-time error 3075 Syntax error in query expression 'Equiptment = 40' Standard Dry"
I am guessing that the error is because of the symbol ' in the string. But here 40' stands for 40 feet and has nothing to do with SQL. How do I make Access understand that? Any help would be greatly appreciated. The code is:
I get the following error when I open a record set:
Run-time error 3075 Syntax error in query expression 'Equiptment = 40' Standard Dry"
I am guessing that the error is because of the symbol ' in the string. But here 40' stands for 40 feet and has nothing to do with SQL. How do I make Access understand that? Any help would be greatly appreciated. The code is:
Code:
If Me.Trailer_opt.Value = 2 Then
ContSize = "40' Standard Dry"
Set Route = CurrentDb.OpenRecordset("SELECT * FROM RouteGuide_tbl WHERE [Origin Country] = '" & ContCode & "' AND [Destination City] = '" & Dest & "' AND [Equiptment] = '" & ContSize & "'")