Computing Question

love_one

New member
Local time
Today, 10:56
Joined
Oct 16, 2011
Messages
3
hi good day to all of you

i have a question in my borrowing form of inventory system

i have a table name "INVENTORY" and having a fields ITEMNAME, QUANTITY, and AVAILABLE

and i have a form for borrowing
i have a cascading combo boxes for the ITEMNAME to look for the QUANTITY

then my question is what if someone borrow any item then the AVAILABLE will update on how many items are remaining and the AVAILABLE field will not change its value if i add new transactions :(

THANK YOU SO MUCH :)
 
First things: I would not keep an available field in my table. This is a calculated field and has no place in a table. Calculations are dynamic and should usually only be done in forms and queries.

Now, you should use the DSum function in your form adding all the quantities in and subtracting all the quantities out.

Here is a link on the use of DSum

http://www.techonthenet.com/access/functions/domain/dsum.php

If you need the information in a report, then do the calculation in a query and make that the record source for the report.
 
i cant solve my problem im very confused on how to answer this...
is it possilbe that if i have a quantity_borrowed field and i have a "Left" field on other table the number that i input in quantity_borrowed will add and add on Left field? and to alarm me that i exceed the total quantity of the the selected item? THANK YOU
 

Users who are viewing this thread

Back
Top Bottom