Hi Frank,
Everybody here understand the calculation you want, so you don't have to
repeat it again. I'm going to try to explain a couple of things that I hope
help you to understand.
Typically at table has a name like "tblRates" and the table structure would
be something like this:
tblRates
RateID (primary key - keeps things organized in Access' mind)
RateName (text - the name of the rate)
RateAmt (currency - the amount of the rate)
Using the above structure, here's some sample data:
RateID RateName RateAmt
1 Hours 36.50
2 Miles 00.75
With this sturcture you can add any number of different 'rates'.
Here's another table:
tblUserInput
InputID (PK-primary key)
RateID (FK - aka 'foreign key' because this is how this table 'relates' to
the tblRate)
UserQuantity (number - this is what the user inputs after selecting a rate)
With this structure you can have an unlimited number of UserQuantity entries
and they can be for any of the rates in your rate table. The data would look
something like this:
InputID RateID UserQuantity
1 1 2
2 2 37
Then, as Jeff Boyce suggested, you build a query that will provide the
results you are looking for. Without going into greater detail, this how the
data 'might' be displayed (meaning just one method).
RateName RateAmt UserQuantity CalcTotal
Hours 36.50 2 73.00
Miles 00.75 37 27.75
One reason that you typically do not want to store the calculated amount in
a table is that the data takes up valuable disk space whereas the query
calculation can recalulate the amounts in an instant whenever you want to
view the amounts.
Now then, there is a potential problem with the above: What do the user
entered amounts relate to? A person, a vehicle, what? How can you tell that
just from the above data?
I hope that this makes some sense to you and helps you to better understand
Access.