ruthcarlton Posted May 21, 2002 Posted May 21, 2002 I have a DB which tracks daily sales of merchandise. I have a field which calculates inventory..."OriginalCount" - "TotalSales", which works, but I'd rather subtract daily sales from an "CurrentInventory" field. How can I create a "CurrentInventory" field which stores the most up-to-date data?
Oldsneekers Posted May 23, 2002 Posted May 23, 2002 How about adding a separate file called Current Inventorly. This file would have a field for the item Name, another for the CurrentNumber, and most importantly a field for a UniqueID which could be the name but better some other unique ID. You may want to add other fields such as date modified, etc. In the other files make a field that stores the UniqueID for each item. In the other files, make a relationship using the uniqueID as the match field. For any transaction script add a script that will: set field(CurrentInventory::CurrentNumber, CurrentInventory::CurrentNumber - AmountSold) In the current inventory file, there is only one record for each item in inventory.
Recommended Posts
This topic is 8290 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now