Solved Runtime Error with CurrentDB.Execute Update

Momma

Member
Local time
Today, 18:26
Joined
Jan 22, 2022
Messages
130
I get this error when I run the code below and can't figure out what the problem is.
Any help would be much appreciated!
Thanks
1680824507760.png


Code:
    If ContactInv > 0 And Payment > 0 And DogInv = 0 Then
           CurrentDb.Execute "UPDATE tblInvoices SET DogID = CurrentDogID" _
                & " WHERE InvoiceID = " & CurrentInvoiceID & ";"
    End If
 
maybe:
Code:
    If ContactInv > 0 And Payment > 0 And DogInv = 0 Then
           CurrentDb.Execute "UPDATE tblInvoices SET DogID = " & CurrentDogID  _
                & " WHERE InvoiceID = " & CurrentInvoiceID & ";"
    End If
 
maybe:
Code:
    If ContactInv > 0 And Payment > 0 And DogInv = 0 Then
           CurrentDb.Execute "UPDATE tblInvoices SET DogID = " & CurrentDogID  _
                & " WHERE InvoiceID = " & CurrentInvoiceID & ";"
    End If
It is exactly that, Arnelgp. Thank you for your help!
 

Users who are viewing this thread

Back
Top Bottom