Hi
I am having problems using a variable in the docmd.runSQL statement:
DoCmd.RunSQL "update tblJob set jbCurrentlyBilling = 1 from dbo.tblBook INNER JOIN " & _
" dbo.tblJob ON dbo.tblBook.bkISBN = dbo.tblJob.jbISBN where tblJob.jbBillTag = 1 and tblBook.bkClient = " & clientToBill
if I replace the clientToBill variable with a hardcoded value say 'abc' then it executes no problem at all.
The clientToBill variable is set ion the following manner:
Dim clientToBill As String
clientToBill = Me.cboClient.Value
When I go through this line by line the variable is holding the correct value. Is my syntax wrong somewhere?
Can anyone help?
Thanks
Steph
I am having problems using a variable in the docmd.runSQL statement:
DoCmd.RunSQL "update tblJob set jbCurrentlyBilling = 1 from dbo.tblBook INNER JOIN " & _
" dbo.tblJob ON dbo.tblBook.bkISBN = dbo.tblJob.jbISBN where tblJob.jbBillTag = 1 and tblBook.bkClient = " & clientToBill
if I replace the clientToBill variable with a hardcoded value say 'abc' then it executes no problem at all.
The clientToBill variable is set ion the following manner:
Dim clientToBill As String
clientToBill = Me.cboClient.Value
When I go through this line by line the variable is holding the correct value. Is my syntax wrong somewhere?
Can anyone help?
Thanks
Steph