Solved Runtime Error with CurrentDB.Execute Update (1 Viewer)

Momma

Member
Local time
Tomorrow, 05:10
Joined
Jan 22, 2022
Messages
114
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
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:10
Joined
May 7, 2009
Messages
19,245
maybe:
Code:
    If ContactInv > 0 And Payment > 0 And DogInv = 0 Then
           CurrentDb.Execute "UPDATE tblInvoices SET DogID = " & CurrentDogID  _
                & " WHERE InvoiceID = " & CurrentInvoiceID & ";"
    End If
 

Momma

Member
Local time
Tomorrow, 05:10
Joined
Jan 22, 2022
Messages
114
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

Top Bottom