Problem with formula

darrrellx

Registered User.
Local time
Today, 11:08
Joined
Apr 25, 2005
Messages
22
I have just created a very simple inventory tracking program and as a total novice I am having problems calculating my Units on Hand field. Attached is a copy of the file. If anyone could give me any pointers I would greatly appreciate it.

Thanks

darrell
 

Attachments

formula

Place a text box in your inventory detail form footer with the following as it's formula:=Forms![inventory detail]![Inventory transactions].Form![Units in stock].
Almost forgot, put this formula in your Units On Hand in your subform(replace what you have with this)
=Sum(nz([Units Received]))-Sum(nz([Units Sold]))

See if this does the trick
 
Last edited:
Couple of points.

1) Remove the table level lookups. They will cause trouble, I promise. You can do all your lookups in a query or a form.
2) Consider only having one field for units sold or purchased, with +ve and -ve values. It will make life a little easier in the long run. You can either test the sign or include a transaction type field to tell you if its a purchase or sale.
 

Users who are viewing this thread

Back
Top Bottom