V
Vic
What did I do wrong.
How to start. I've have a form that a user puts in mileage information.
Then I created a table for different mileage rate.
On the main form I have a field called LdMilRteMT. This is the table
tbl_LoadInfo and is defined as a lookup field to table tbl_MileageRate. This
field is a popup and the bound column is 1 which is the ID in the table
called tbl_MileageRate Rate that holds the different rate. The field showing
is the actual mileage rate that is selected. Let's say $.40 per miles.
Then I went through the help menu and created a text field to actually show
the payout for the mileage. In that text field I put the in the control
source the following:
=[LdMilRteMT]*[LdMtMiles]
This works great except for one problem. It doesn't calculate correctly.
Lets say you have 130 miles * $.40. The total should be $52.00. The total
I'm getting is $130.00.
I found what it's doing. It's taking the record ID or autonum field and
multiplying that times the miles. It's not using the mileage rate displayed
on the screen.
Oh the table that holds the mileage information is called tbl_MileageRate.
The field that actually holds the mileage rate information in that table is
called of course MileageRate.
Any idea's where I went wrong. I really would just prefer to store the
results in another field but from what I've read I guess that's a bad idea.
Thanks Everyone
How to start. I've have a form that a user puts in mileage information.
Then I created a table for different mileage rate.
On the main form I have a field called LdMilRteMT. This is the table
tbl_LoadInfo and is defined as a lookup field to table tbl_MileageRate. This
field is a popup and the bound column is 1 which is the ID in the table
called tbl_MileageRate Rate that holds the different rate. The field showing
is the actual mileage rate that is selected. Let's say $.40 per miles.
Then I went through the help menu and created a text field to actually show
the payout for the mileage. In that text field I put the in the control
source the following:
=[LdMilRteMT]*[LdMtMiles]
This works great except for one problem. It doesn't calculate correctly.
Lets say you have 130 miles * $.40. The total should be $52.00. The total
I'm getting is $130.00.
I found what it's doing. It's taking the record ID or autonum field and
multiplying that times the miles. It's not using the mileage rate displayed
on the screen.
Oh the table that holds the mileage information is called tbl_MileageRate.
The field that actually holds the mileage rate information in that table is
called of course MileageRate.
Any idea's where I went wrong. I really would just prefer to store the
results in another field but from what I've read I guess that's a bad idea.
Thanks Everyone