nicksource
Registered User.
- Local time
- Today, 12:16
- Joined
- Feb 18, 2008
- Messages
- 69
Hi guys,
I'm new to Access except using it years back but much has changed from the 2000 version to the 2007 version - it's slowly coming back to me though, as it's mostly just an interface change. Although I'm highly experienced in SQL (mySQL) and database design / structure from being a Web Programmer.
I'm wanting to store a stock amount for products. Using 3 tables, for products, orders and sales. Here's a real basic layout:
The products table is just a list of the products. Sales is where I log what I sell to customers and the orders are what I buy from my suppliers.
What I'm wishing to do is use the products table to store the stock of that item so as soon as I make a sale, that quantity for that prodID is subtracted instantly from the productStock and when I make an order it's instantly added.
Is this possible, or is there a good way to do this?
All help appreciated!
Thanks,
Nick.
I'm new to Access except using it years back but much has changed from the 2000 version to the 2007 version - it's slowly coming back to me though, as it's mostly just an interface change. Although I'm highly experienced in SQL (mySQL) and database design / structure from being a Web Programmer.
I'm wanting to store a stock amount for products. Using 3 tables, for products, orders and sales. Here's a real basic layout:
Code:
[U]products[/U]
[COLOR="Red"]prodID [/COLOR]| productName | productStock
[U]orders[/U]
orderID | supplier | [COLOR="Red"]prodID[/COLOR] | quantityBought
[U]sales[/U]
saleID | customer | [COLOR="Red"]prodID[/COLOR] | quantitySold
The products table is just a list of the products. Sales is where I log what I sell to customers and the orders are what I buy from my suppliers.
What I'm wishing to do is use the products table to store the stock of that item so as soon as I make a sale, that quantity for that prodID is subtracted instantly from the productStock and when I make an order it's instantly added.
Is this possible, or is there a good way to do this?
All help appreciated!
Thanks,
Nick.