Form/Table Problem (form doesn't input info into table)

  • Thread starter Thread starter ccraiff
  • Start date Start date
C

ccraiff

Okay here we go:

I have a form that has 3 main input fields. (I use this form to track
expenses for the maintenance department).

Field 1 : "Price Each" - the user inputs the base cost of an item
Field 2: "Qty Ordered" - the user inputs how many of said item he/she
purchased
Field 3: "Total Cost" - the computer automatically inputs the total
cost by way of the Data Property Control Source being set to "=[Price
Each]*[Qty Ordered]"

Everything works great in the form view.

This form inputs data into a table called "Parts Purchased". When
viewing the table, all information that was hand entered is correct,
however the field of "Total Cost" always remains $0.00 (the default
value).

If I change Field 3 in the form to enter the total cost by hand
(instead of using the Control Property formula), the data is then
entered into the table correctly. I only have this problem when
attempting to have the computer do the math.

I have tried multiple things while entering the data into the form,
including hitting enter while clicked inside of the box for field 3,
hitting refresh after entering the data, etc... but alas, while using
this computer calculated field, the end results is always $0.00 in the
table. Any idea how to have that value that the computer
automatically enters into the form actually show up in the table?
 
This form inputs data into a table called "Parts Purchased". When
viewing the table, all information that was hand entered is correct,
however the field of "Total Cost" always remains $0.00 (the default
value).

Storing derived data such as this in your table accomplishes
three things: it wastes disk space; it wastes time (almost
any calculation will be MUCH faster than a disk fetch); and
most importantly, it risks data corruption. If one of the
underlying fields is subsequently edited, you will have data
in your table WHICH IS WRONG, and no automatic way to detect
that fact.

Just redo the calculation whenever you need it, either as a
calculated field in a Query or just as you're now doing it -
in the control source of a Form or a Report textbox.
 
Back
Top