T
TM
I am trying to run an update query in VBA but keep
getting the error message #3061, too few parameters,
expected 1"
I looked this up and find that I apparently need to use
the EVAL() statement. Only, I am confused as to why and
where!? I understand, I think, what it does, but I as I
said, why and where. I am just trying to update a field
in a table if a customer is selected from a list box.
The where condition is on the customerid field, so there
is always an entry for it. The field to be updated is
default of "no" and needs to be "yes" if selected. So,
there is no value in that field to begin with.
Here is my statement:
db.Execute("UPDATE [tblCustomer] SET tblCustomer.
[newsletter] = Yes WHERE (((tblCustomer.CustomerID)
=varID")
getting the error message #3061, too few parameters,
expected 1"
I looked this up and find that I apparently need to use
the EVAL() statement. Only, I am confused as to why and
where!? I understand, I think, what it does, but I as I
said, why and where. I am just trying to update a field
in a table if a customer is selected from a list box.
The where condition is on the customerid field, so there
is always an entry for it. The field to be updated is
default of "no" and needs to be "yes" if selected. So,
there is no value in that field to begin with.
Here is my statement:
db.Execute("UPDATE [tblCustomer] SET tblCustomer.
[newsletter] = Yes WHERE (((tblCustomer.CustomerID)
=varID")