Reputation: 3
Receiving error message 'Runtime Error 3061: Too few parameters. Expected 1'
This code fails:
dbs.Execute "UPDATE Master " _
& "SET Selected = -1, tmpListName=Me.inpListName.Value " _
& "WHERE Active = -1 ; "
inpListName is an unbound TextBox in the form header.
This code works:
dbs.Execute "UPDATE Master " _
& "SET Selected = -1, tmpListName='some value' " _
& "WHERE Active = -1 ; "'
Code is attached to button onclick in header of form.
Thanks in advance for any help here.
regards Alan
Upvotes: 0
Views: 35
Reputation: 6336
Try this:
dbs.Execute "UPDATE Master " _
& "SET Selected = -1, tmpListName='" & Me.inpListName.Value & "' " _
& "WHERE Active = -1 ; "
Upvotes: 1