sql syntax error
From: JohnE (JohnE_at_discussions.microsoft.com)
Date: 10/11/04
- Next message: mike: "RE: sql syntax error"
- Previous message: JohnG: "OLE Object (Bitmap Image) Type?"
- Next in thread: mike: "RE: sql syntax error"
- Reply: mike: "RE: sql syntax error"
- Reply: Douglas J. Steele: "Re: sql syntax error"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 11 Oct 2004 11:33:04 -0700
I am getting a syntax error from the following;
Dim strSQL As String
Dim MyTime
MyTime = Time
strSQL = "INSERT INTO
tblWhoLoggedOn(UserName,UserPassword,Date,Time) " & _
" VALUES (" & Me.cboUserName & "," & Me.txtUserPassword &
",Now(),MyTime)"
CurrentDb.Execute strSQL, dbFailOnError
I am wanting to track those who sign into the db. When the error comes up,
it highlites the last line (CurrentDb...).
Can anyone see the mistake made in this?
Thanks in advance to anyone who responds.
*** John
- Next message: mike: "RE: sql syntax error"
- Previous message: JohnG: "OLE Object (Bitmap Image) Type?"
- Next in thread: mike: "RE: sql syntax error"
- Reply: mike: "RE: sql syntax error"
- Reply: Douglas J. Steele: "Re: sql syntax error"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|