VBA Problem (DAO)

dozzen

New member
Local time
Today, 01:47
Joined
Feb 26, 2007
Messages
4
Hey i'm new to the forum and the whole VBA coding and have come accross a problem. Im using a database to manage the transactions of a software retailer.

Basically it concerns two tables:
tblStock(Stock_ID, Product_Name, Manufacturer, Price, Qty_Stock)
and a table tblOrder which contains the details for every order made. Every order contains one product only. In this table there's a field "Quantity" which specifies the number of copies of a particular piece of software that is ordered.

My problem is that i want the Qty_Stock field in the STOCK table to update itself every time an order is made i.e. When a button, say, "Confirm Order" is clicked (I have already designed the appropriate forms) the value of Quantity is subtracted from Qty_Stock for the appropriate product.

I would appreciate it if anyone can help me in coding this problem.

Thanks in advance :o
 
Thanks for the reply; however the case described there is much more complicated than my own replational database and i cannot sort out the code relevant for my task.
 
The point in providing the link was to show you that Inventory is *not* a simple project.
 
Right... maybe thats why you couldn't provide me with a decent answer in the first place.

Anyway i managed to sort it out; if anyone has a similar problem you could PM me for my solution.
 
Last edited:
RG,
consider yourself told off by a new poster. Whatever next, we'll be expected to supply complete solutions.
 
Why the sarcasm? I think that the majority of the posters in this forum aren't as competent as some of you, and the fact that you answer questions with a single sentence doesn't really help.

Oh and searching the forum doesn't really provide you with an answer as intended; 90% of the posts on this topic are answered in the above manner.
 
Ummm...my suggestion would be a query just like was suggested. I run a distribution company with products from 20-30 vendors and over 300 customers. My inventory query is populated by 6 different tables, it's a real PITA. Trying to have a live inventory as a record in a table that you are always updating is like asking to solve for x in the following equation:

x = x
 

Users who are viewing this thread

Back
Top Bottom