KenshiroUK
Registered User.
- Local time
- Today, 19:04
- Joined
- Oct 15, 2012
- Messages
- 160
Okay this is very simple, I wish to create a query based on my sum to update my stock count.
I have created a query that performs a sum of taking what was ordered and subtracting it from what is in stock. This returns a figure of how many are left, what I wish to do is take that figure and update my stock in my Inventory table. My stock level in Inventory is Count and in the query the final sum is called 'Left in Stock'.
My only problem is when a new order is placed and I run the query again I do not wish for duplicate orders to be subtracted off stock, so when a customer orders another of the same product it does not count the original order again, only the new one.
I have created a query that performs a sum of taking what was ordered and subtracting it from what is in stock. This returns a figure of how many are left, what I wish to do is take that figure and update my stock in my Inventory table. My stock level in Inventory is Count and in the query the final sum is called 'Left in Stock'.
My only problem is when a new order is placed and I run the query again I do not wish for duplicate orders to be subtracted off stock, so when a customer orders another of the same product it does not count the original order again, only the new one.