I'm trying to create a text string for one of the target fields in an Insert Into statement, but can't seem to combine a text literal -- in this case, the characters
Invoice: $
with a reference to a field on an open form.
I get:
Run time error 3075 -
Syntax error(missing operator) in query expression "Invoice: $'6'.
Any ideas what's happening? I assume it's with my quotes, but I've tried every variation, without success!
Invoice: $
with a reference to a field on an open form.
Code:
db.Execute "Insert into Payments (donorID, PaymentMemo) VALUES (" & Forms!Donors.DonorID & ", 'Invoice: $ '" & Forms!Donors.PledgeAmount & ")"
I get:
Run time error 3075 -
Syntax error(missing operator) in query expression "Invoice: $'6'.
Any ideas what's happening? I assume it's with my quotes, but I've tried every variation, without success!