Can Access do some basic calculation ?

  • Thread starter Thread starter Jayevans
  • Start date Start date
J

Jayevans

Guest
I just want it to deduct:
one numeric field from another - to get a miles travelled number ?
one currency figure from another - to get how much more/less fuel was used than last month ?

also to work out:
an average of 3 figures
to multiply one figure by another ?

Is this possible ?
How easy is it ?

This is because I want to move my Excel spreadsheets to Access so I can alalyse it better and create custom reports. But despite browsing Access for a while, I can't find the features I need, or anything in the help file to help me.

I've been using Access for a few years (Access 2000) and have created two custom databases from scratch.

Jay Evans
IT Support Co-ordinator for Simply Drinks Ltd
 
Calculations

If you search the Forum you will find plenty of information about calculations
and how to implement them, as well as tips about importing spreadsheets.
 
Calculations can be done in many places. For example, a calculation in a form control's ControlSource might look like:
=fldA - fldB
If either field could be null, you'll have to handle that situation by using the Nz() function. So the calculation would look like:
=Nz(fldA,0) - Nz(fldB,0)

One thing you need to understand right off the bat is that relational databases store data differently than spreadseets do. You should spend some time reading about normalization so you understand what this means. Because relational theory prohibits the storing of repeating groups, you will NEVER find any VBA/SQL aggregate function that works accross a row as an excel function would. VBA/SQL aggregate functions work on a "set" of data as defined by the rows of a recordset. That means that if you are going to use the Avg() function to average a set of data, each element will come from a separate row as opposed to a column as might be the case in a spreadsheet.
 

Users who are viewing this thread

Back
Top Bottom