Mike, you have used the same construct many times. I know I have advised you at least twice over in UA regarding recordsets and form controls.
You have been playing with Access since 2005. ?
People have grown up and learnt to drive in that time.
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
The update query would be the same statement without the reference to the rs stock ID
HOWEVER
I wouldn't do it this way without adding another control field (Date or flag) to the record to indicate that it had been updated into the QtyOnH.
You then only update those records where the date is null and then set the date as part of the process.
Otherwise you would update the same records into you QtyOnH field again and again.
This is why most simpler stock systems are based on transactions, and a running sum.
What happens if someone change the Qty or delete the line?
You can maintain a qty on hand but you need to be very careful with it.
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓