Page 3 of 3 FirstFirst 123
Results 31 to 32 of 32
  1. #31
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,938


    Quote Originally Posted by mike60smart View Post
    Hi Welshgasman
    I knew I had used this previously but could not find the file I had saved with the code.

    Many thanks and maybe I will remember now.
    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

  2. #32
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    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 ↓↓

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Recordset refuses to update :)
    By ironfelix717 in forum Programming
    Replies: 7
    Last Post: 03-09-2020, 12:32 PM
  2. Recordset to update a table
    By john134 in forum Programming
    Replies: 6
    Last Post: 04-19-2017, 11:01 AM
  3. recordset won't update
    By charlieb in forum Access
    Replies: 3
    Last Post: 04-13-2015, 05:56 PM
  4. Update recordset - 'Not responding'
    By tariq1 in forum Programming
    Replies: 2
    Last Post: 08-11-2012, 11:33 AM
  5. Update Query?? or RecordSet??
    By bbrazeau in forum Queries
    Replies: 2
    Last Post: 01-13-2012, 08:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums