Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2012
    Posts
    1

    Unanswered: Query Updates All existing transactions and not just the new one.

    So I think I understand what is happening in my database but I can't figure out how to solve it.

    I have a form for whenever a transaction takes place for renting movies. The user would fill out employee, movie being checked out, how many, etc. After this processes and is saved to the Transaction table a macro is run when the form is processed and activates a query that updates the Movie Inventory table. So lets say someone checks out 1 of Hancock and it records to transactions then updates how many are left on hand and how many are checked out in the movie inventory just fine. But when I go to do another movie lets say 1 of Jaws it adds an additional 1 to Hancock plus the new 1 to Jaws. I believe it's because every time I click my event button "Process" to run the macro it re-runs all the recorded transactions in the form yet again and updates them all over even though I only want the newly entered item on the form to update.

    Is there anyway to work around this problem?

  2. #2
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    Please copy and paste the VBA code and SQL of your update query so we can have a better idea what's happening.

    Thanks,
    Sam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •