Jumat, 16 Agustus 2013

[MS_AccessPros] Help with string in query

 

I am sure this is simple but I just can't see the issue. The following is a section of code to add auto generated notes to a table with a record is added or updated.

tmpDate = Date
tmpNotes = "Payment of $'" & Tbox_ActualPayment & "' logged by " & tmpUser & " on #" & tmpDate & "#"
dbs.Execute "UPDATE tblPayments " _
& " SET [strPaymentNotes] = " & tmpNotes & " " _
& " WHERE (([lngPaymentPlanNum] = " & Tbox_PaymentPlanNum & ") AND ([strDateScheduled] = #" & Tbox_DateScheduled & "#))"

the problem lies with the tmpNotes string. When the Update query is activated an error message stating syntac error (missing operator) in query expression. The quoted expression is

"Payment of $'1645' logged by Robert on #8/16/2013#"

Hope that makes sense.
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