Populating a table with a calculated value from a form

  • Thread starter Thread starter JDP
  • Start date Start date
J

JDP

I have a form that uses a number of calculations (over 50)
to generate a final value from data entered in Table 1. I
need to capture this result so I can print a report
containi the data from Table 1 along with the final
value.

Any suggestions would be appreciated.
 
One approach would be to create a function that does the calculation, then
use that function to return the calculated value in a query. Base your
report on the query.
 
I have a form that uses a number of calculations (over 50)
to generate a final value from data entered in Table 1. I
need to capture this result so I can print a report
containi the data from Table 1 along with the final
value.

Any suggestions would be appreciated.

If you're willing to accept the serious disadvantages of storing
derived data (the fact that the stored value will be WRONG if any of
the underlying fields change, in particular!), you can use the Form's
BeforeUpdate event to store the redundant field. Create a field in the
table to hold the field, and in the Form's BeforeUpdate event use an
expression like

Me!storedfield = Me!txtCalcField

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top