I am trying to run the following code from a button in a continuous form. The button is inline with the record
Private Sub AssignInvoice_Click()
Dim dbs As Database
Dim qdf As QueryDef
Set dbs = CurrentDb
dbs.Execute "Update tbl_ImportedRepairs " _
& "SET tbl_ImportedRepairs.Invoice = 'me.[UpdateInvoice]'" _
& "WHERE tbl_ImportedRepairs.Batch = Me.Batch AND PaymentRespID=me.PaymentRespId;"
dbs.Close
End Sub
I get the error Run-Time error '3061' Too few parameters. Expected 2
I am trying to run an update query to update any item in the database that matches the Batch and PaymentRespId in the current record to be the value of UpdateInvoice which is a unbound text box in the row.
The Invoice Field is text field and the Batch and PaymentRespId fields are number