Expression result not entered in table

  • Thread starter Thread starter Kerman
  • Start date Start date
K

Kerman

How do I get the result of an expression entered in a table? I have this
expression as the control source: =[Sample Size]-[Edible Kernels]-[Inedible
Kernels] but I need the result of this expression such as: 10.2 entered in
the field named: "ForMat" in my table...What should I do?...Thanks..>Randy
 
Would it represent an error if there was ever a case where the ForMat field
did not match the formula?

If so, use a query with calculated field instead of storing the dependent
data in your table. In query design view, type this into a fresh column on
the Field row:
ForMat: [Sample Size]-[Edible Kernels]-[Inedible Kernels]
Since the query can never be wrong, your worries are over.

If there could be a valid difference, you will need to enter the data
through a form, and use the AfterUpdate event of all 3 fields to put the
result into the ForMat text box. The Event Procedure will look like this:

Me.ForMat = Me.[SampleSize] - Me.[Edible Kernels] - Me.[Inedible
Kernels]
 
Back
Top