SonicBoomAu
Well-known member
Hi All.
I am having a problem with a SQL Statement.
Heres the code:
Heres the error I get:
"Syntax error (missing operator) in query expression SwitchLoc = - AND BladeNo = - AND PortNo = *
SwitchLoc, BladeNo and PortNo are all columns in an Access DB. Does anyone know where I am going wrong with this?????
I have tried the SQL statement on a single line and received the same error. I.E. strNewSQLStatement = "SELECT " & strP2Custom & " From PermanentAssets WHERE SwitchLoc = " & strSwitchLocValue & " AND BladeNo = " & strBladeLocValue & " AND PortNo = " & strPortNoValue & ""
Please Help
I am having a problem with a SQL Statement.
Heres the code:
Code:
Dim strNewSQLStatement As String
strNewSQLStatement = "SELECT " & strP2Custom & _
" From (PermanentAssets) " & _
"WHERE SwitchLoc = " & strSwitchLocValue & _
" AND BladeNo = " & strBladeLocValue & _
" AND PortNo = " & strPortNoValue & " "
Call LoadDBIntoDG(strNewSQLStatement, "Permanent")
Heres the error I get:
"Syntax error (missing operator) in query expression SwitchLoc = - AND BladeNo = - AND PortNo = *
SwitchLoc, BladeNo and PortNo are all columns in an Access DB. Does anyone know where I am going wrong with this?????
I have tried the SQL statement on a single line and received the same error. I.E. strNewSQLStatement = "SELECT " & strP2Custom & " From PermanentAssets WHERE SwitchLoc = " & strSwitchLocValue & " AND BladeNo = " & strBladeLocValue & " AND PortNo = " & strPortNoValue & ""
Please Help