T
Tom
The function below gives me the error:
"Syntax error in INSERT INTO statment. (3134)".
Does anyone know how to modify the INSERT statement?
Also, the DATE format should be simply in "MM-DD-YY"
format?
Thanks in advance,
Tom
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Private Sub Location_AfterUpdate()
On Error GoTo Err_Location_AfterUpdate
strSQL = "INSERT INTO History" & _
"VALUES ( " & _
Format$(Now(), "\#yyyy\-mm\-dd hh\:nn\#")
& ", " & _
"""" & Me!Location.Value & """)"
MsgBox strSQL, , "Location history table will be
updated!"
CurrentDb().Execute strSQL, dbFailOnError
End_Location_AfterUpdate:
Exit Sub
Err_Location_AfterUpdate:
MsgBox Err.Description & " (" & Err.Number & ")", _
vbOKOnly + vbCritical
Resume End_Location_AfterUpdate
End Sub
"Syntax error in INSERT INTO statment. (3134)".
Does anyone know how to modify the INSERT statement?
Also, the DATE format should be simply in "MM-DD-YY"
format?
Thanks in advance,
Tom
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Private Sub Location_AfterUpdate()
On Error GoTo Err_Location_AfterUpdate
strSQL = "INSERT INTO History" & _
"VALUES ( " & _
Format$(Now(), "\#yyyy\-mm\-dd hh\:nn\#")
& ", " & _
"""" & Me!Location.Value & """)"
MsgBox strSQL, , "Location history table will be
updated!"
CurrentDb().Execute strSQL, dbFailOnError
End_Location_AfterUpdate:
Exit Sub
Err_Location_AfterUpdate:
MsgBox Err.Description & " (" & Err.Number & ")", _
vbOKOnly + vbCritical
Resume End_Location_AfterUpdate
End Sub