malaysiauser
04-28-2009, 01:12 AM
hi there... im creating a database to reduce mistakes for data entry purpose.
table 1: product code | received quantity etc..
table 2: product name | vendor name etc..
form 1: product code | received quantity etc..
result : product name| product code| received qty| vendor name
my question;
the operator will input using form 1. i want that the received quantity is accumulated in table 1, everytime the operator input received quantity for a same code....
e.g:
code item qty
343343 Tshirt 200
343343 Tshirt 120
so the result will appear the total as below
343343 Tshirt 320 and not repeated data...
please guide..
Uncle Gizmo
04-28-2009, 02:10 AM
The usual method is to store these values:
343343 Tshirt 200
343343 Tshirt 120
In your table, and then use a query to add the values you want together. This way if a mistake is made, lets say for instance the operator entered 102 instead of 120, and if you have accumulated the answer, it would be very difficult to undo. However by using a query any changes are automatically adjusted for.
malaysiauser
04-28-2009, 05:01 PM
hello
im attaching my workbook here...
the operator will key in entry by using 'Data Update' form.
i want if the same item key in repeatedly, the received quantity is totalled and not repeated record.
and, how to add formulas... for example, in 'stock amount', i want to add 'unit price' x 'opening stock'.
please guide...
million thanks..
KathyL
04-28-2009, 09:07 PM
It is not common to try to store totals of values in fields that can be easily computed (on the fly).
I envision that you would benefit from having a subform on your form, where the related transactional records are shown, and the primary form/fields above the subform would be the primary vendor.
When using a subform, you can place calculated sum/totals in your subform (which won’t be visable), and then you can add a calculated field on the primary form referencing the subform total fields, which will show your totals. The totals will adjust automatically every time you post another transactional quantity.
This is a very common approach, and is what I teach in the database classes I teach. What I am describing is not an entry level technique, but all of my students successfully do this by the end of one semester. It might be too difficult to describe here quickly, but there may be other forums or websites which give examples.
malaysiauser
04-28-2009, 09:37 PM
thank you very much...
im still finding how to create subform...