T
TeeSee
When I run the following code I get the error message "Syntax Error
(Missing Operator in Query Expression 'C:\MyDocuments ....... \My.Doc'
Private Sub txtType_AfterUpdate()
Dim db As DAO.Database
Dim strSQL As String
Set db = DBEngine(0)(0)
strSQL = "INSERT into tblDataPaths (DataPathID, txtCode,
txtSavedData, txtDataType)"
strSQL = strSQL & "VALUES (" & DataPathID & "," & txtCode & "," &
txtPath & "," & txtType & ");"
Debug.Print strSQL
db.Execute strSQL, dbFailOnError
Set db = Nothing
Me.Requery
End Sub
When I copy the strSQL into the SQL window and run it I get the same
error message and the cursor blinks on the colon after the capital C
and I can't figure out why. Can anyone please suggest a solution.
Thanks as always
(Missing Operator in Query Expression 'C:\MyDocuments ....... \My.Doc'
Private Sub txtType_AfterUpdate()
Dim db As DAO.Database
Dim strSQL As String
Set db = DBEngine(0)(0)
strSQL = "INSERT into tblDataPaths (DataPathID, txtCode,
txtSavedData, txtDataType)"
strSQL = strSQL & "VALUES (" & DataPathID & "," & txtCode & "," &
txtPath & "," & txtType & ");"
Debug.Print strSQL
db.Execute strSQL, dbFailOnError
Set db = Nothing
Me.Requery
End Sub
When I copy the strSQL into the SQL window and run it I get the same
error message and the cursor blinks on the colon after the capital C
and I can't figure out why. Can anyone please suggest a solution.
Thanks as always