Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

updating all records displayed on form

Status
Not open for further replies.
Jul 17, 2003
66
0
0
US
I have a PO receiving form. Right now my users have to go to each item and enter the received quantity [rec_qty]. But I'd like add a button that would update the [rec_qty] field to equal the [qty_used] field for every item displayed on the form. Once all the records are updated they can then go thru and manually change the item or two that they did not receive as most PO's are recieved in full.

I've tried this command but I get an error that says "Syntax error in query, Incomplete query clause."

CurrentDb.Execute "UPDATE 'PO lookup' SET [qty_rec]=[qty_used]"

My question, is the right way to try do this? If so what is wrong with the command, if not how should I do it?

Thanks ....



 
Access syntax:
CurrentDb.Execute "UPDATE [!][[/!]PO lookup[!]][/!] SET [qty_rec]=[qty_used]"

I wonder you don't use a WHERE clause.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top