field calculation

  • Thread starter Thread starter cc
  • Start date Start date
C

cc

I would like the data in a particular field to be a calculation based on
numbers in two other fields, i.e.:
<Annual Rate> = <Annual Rate per Square Feet> * <Square Feet>
 
In your query (not in the table) put this ---
Annual Rate: [Annual Rate per Square Feet] * [Square Feet]
 
But, I really want the calculation to be done immediately for the field
<Annual Rate>, once the two other factors are known. So, when I am entering
data in Form View, the field <Annual Rate> will be filled in automatically
when I enter the data in the other two fields.

KARL DEWEY said:
In your query (not in the table) put this ---
Annual Rate: [Annual Rate per Square Feet] * [Square Feet]

--
KARL DEWEY
Build a little - Test a little


cc said:
I would like the data in a particular field to be a calculation based on
numbers in two other fields, i.e.:
<Annual Rate> = <Annual Rate per Square Feet> * <Square Feet>
 
You can show the calculated data in a text field in form view, but DO NOT
store it in a table. Let's say thet the two input fields are txtRPerFt and
txtSqFt. Your result could appear in a text box on the form whose data source
is =txtRPerFt*txtSqFt

This result should not be written to the table - it can always be
regenerated by a query for display or printing in reports.
 
You will find many post from people in the know that say you should not store
calculated results in a table. If a data element changes then the math will
be wrong.
You can do it in your data entry form by having an After Update event or
macro to Set Value when all elements have data.
--
KARL DEWEY
Build a little - Test a little


cc said:
But, I really want the calculation to be done immediately for the field
<Annual Rate>, once the two other factors are known. So, when I am entering
data in Form View, the field <Annual Rate> will be filled in automatically
when I enter the data in the other two fields.

KARL DEWEY said:
In your query (not in the table) put this ---
Annual Rate: [Annual Rate per Square Feet] * [Square Feet]

--
KARL DEWEY
Build a little - Test a little


cc said:
I would like the data in a particular field to be a calculation based on
numbers in two other fields, i.e.:
<Annual Rate> = <Annual Rate per Square Feet> * <Square Feet>
 
Karl, Is this a database to track property lease information? I'm stuggling
trying to make one. I'm new to relational databases.

KARL DEWEY said:
You will find many post from people in the know that say you should not store
calculated results in a table. If a data element changes then the math will
be wrong.
You can do it in your data entry form by having an After Update event or
macro to Set Value when all elements have data.
--
KARL DEWEY
Build a little - Test a little


cc said:
But, I really want the calculation to be done immediately for the field
<Annual Rate>, once the two other factors are known. So, when I am entering
data in Form View, the field <Annual Rate> will be filled in automatically
when I enter the data in the other two fields.

KARL DEWEY said:
In your query (not in the table) put this ---
Annual Rate: [Annual Rate per Square Feet] * [Square Feet]

--
KARL DEWEY
Build a little - Test a little


:

I would like the data in a particular field to be a calculation based on
numbers in two other fields, i.e.:
<Annual Rate> = <Annual Rate per Square Feet> * <Square Feet>
 
Back
Top