field calculation

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>
 
K

KARL DEWEY

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

cc

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>
 
T

tedmi

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.
 
K

KARL DEWEY

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>
 
R

RKP

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top