update qty field in one table from a qty in another table

rainbows

Registered User.
Local time
Today, 11:06
Joined
Apr 21, 2017
Messages
428
HI,

Not sure if this is possible but i would like to enter a "qty reqd" "ie 6 as highlighted in line one In the orders table and it would update the "on order qty " in the stocklist table .. ie from 1 to 7

thanks steve



1671185140622.png
 
Use an Update query.
What is the difference between [Qty Reqd] and [Qty Required]?
 
the qty required is the amount to need to buy to cover the orders
the qty out is the amount you need to buy because you could have some in stock
the qty reqd is what the purchaser will actually buy incase he want to put some extra into stock

i dont know how to do an update query using a calculation

1671199145427.png


1671199198735.png
 
UPDATE Stocklist SET StockList.[qty reqd] = StockList].[qty reqd] + Forms!YourForm![qty ordered]

Pleast note: This is a poor way to manage inventory. Inventory should be managed using a transaction table where you always add a transaction so you can see distinctly each update that was made for stock in or out.

Also, using embedded spaces in poor practice and causes you to always surround your field name in square brackets. VBA has more rigid rules for variable names than does SQL and so VBA will substitute all invalid characters with an underscore. So for example, you have a name such as [Discount %], it will end up as Discount__ if you have to reference it in VBA Names should be comprised of only a-z, A-Z, 0-9 and the underscore. It is also very important to avoid using the names of functions and properties such as Date, Year, and especially "Name".
 

Users who are viewing this thread

Back
Top Bottom