ChrisLeicester
Member
- Local time
- Today, 00:03
- Joined
- Feb 14, 2025
- Messages
- 59
Hi All
Some may know, I am building my stock inventory database and learning as I go.
I always believed, or read somewhere that good design is not to hold unnecessary data and to let access calculate data as required.
With this in mind, I haven't got a current stock field in my products table, access knows what I have bought and what I have sold, so in theory, I can calculate what my stock should be.
I am also a member of a reddit access group and someone also building their inventory asked how to calculate stock and another user gave them vba to calculate it on each event.
If x is sold then stock = stock minus x, and when y is bought then stock = stock plus Y
This means they keep in their table a field containing running stock levels.
Obviously, no real right or wrong way, and everybody will design their database how they want, but as a general rule, which is the preferred method.
Are there any real advantages to keeping stock levels totaled in a table?
How do the access Guru's prefer to do it.
Thanks
Some may know, I am building my stock inventory database and learning as I go.
I always believed, or read somewhere that good design is not to hold unnecessary data and to let access calculate data as required.
With this in mind, I haven't got a current stock field in my products table, access knows what I have bought and what I have sold, so in theory, I can calculate what my stock should be.
I am also a member of a reddit access group and someone also building their inventory asked how to calculate stock and another user gave them vba to calculate it on each event.
If x is sold then stock = stock minus x, and when y is bought then stock = stock plus Y
This means they keep in their table a field containing running stock levels.
Obviously, no real right or wrong way, and everybody will design their database how they want, but as a general rule, which is the preferred method.
Are there any real advantages to keeping stock levels totaled in a table?
How do the access Guru's prefer to do it.
Thanks