Sabtu, 03 Agustus 2013

[MS_AccessPros] Need help with query

 

I am missing something simple in the following query:

dbs.Execute "UPDATE tblKronosEdits " _
& " SET [Kronos] = '" & kcnt + CboKronosCount.Value & "', [DBUser] = '" & LoggedUser & "', " _
& " [Date Logged] = #" & LogDate & "#, [KronosNotes] = " & mstr & "." _
& " WHERE (Employee = " & cboEmployeeName & ") AND (([Date Affected])= #" & tboxKronosDate & "#)"

everything works great without adding the
[KronosNotes] = " & mstr& &
section. Get error 3075 Syntax error (missing operator)

mstr = "Initial Kronos edits of 2 logged by Carol on 08/23/2013." & _
vbCrLf & "Initial Kronos edits of 2 logged by Carol on 08/23/2013."
(mstr is duplicated for testing purposes at present.)
mstr was created by copying one string then adding the CrLf character followed by adding the original string to mstr.

mstr = tNotes & vbCrLf
mstr = mstr & tNotes

The error is associated with the mstr string in the query.

I know it must be something simple.
Rod

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar