syntax question for db.Execute Update

H

Heather

I'm trying to update a column (in a table) in a module but
am getting a syntax error when I compile. I'm trying to
set a column value to another column * a value. (example:
dbs.Execute " Update sometble.plannedhrs Set
sometbl.plannedhrs = (sometbl.percent * .375));"

What is the correct syntax
 
D

Douglas J. Steele

You don't need the field name, just the table name, after the Update
statement.

You've also got an extra closing parenthesis:

dbs.Execute " Update sometble Set plannedhrs = ([percent] * .375);"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top