Insert into

steve_4477

Registered User.
Local time
Today, 05:27
Joined
Jan 10, 2011
Messages
23
Any ideas why this:

CurrentDb.Execute ("INSERT INTO PricingList (WinningBid) Values(0) Where PricingID = '689'")

Returns this:

Query input must contain at least one table or query? Is it the '0' value that I am trying to add? I am trying to change the value of a 'Yes/No' box......

Steve
 
A WHERE clause is only appropriate for a SELECT clause, not a VALUES clause. That query would insert a new record. If you're trying to change an existing record, you'd want an UPDATE query:

UPDATE TableName
SET FieldName = Whatever
WHERE FieldName = YourValue
 
Makes sense, thanks!

So now I am getting a datatype mismatch in criteria expression:

CurrentDb.Execute ("UPDATE PricingList SET WinningBid = '0' WHERE PricingID = '689'")

Any ideas?
 
Nm- just a simple syntax error. It was the single quotes- didn't need them.

Thanks again!
 

Users who are viewing this thread

Back
Top Bottom