View Full Version : simple question


Essendon
11-01-2001, 10:26 PM
hi,

This is probably too easy a question, but I was wondering how you can enter formula into a field that references another field in the same table?

I have one field called Fare, and another called fare2 that (in excel) is: "= fare * 100.5"

How could I get this to work in access?

Fornatian
11-01-2001, 10:52 PM
Do not store calculated fields in your table, they will take up space and can usually be extrapolated from the existing data. There are few exceptions to this.

The way to do what you ask is to build a query including all the fields you want returned in the recordset, then add an extra column to the query to hold the calculated value.

You can then enter something like this in the header portion:

MyCalcFare: [fare] * 100.5

Where MyCalcFare is the name displayed in the column head and [fare] is a field in the table.

Once you've cracked that you can treat the query in the same way you would any other table.

HTH

Ian Tamburello