Small Pop Up Form to Calculate Mileage Reimbursement

  • Thread starter Thread starter Robert T
  • Start date Start date
R

Robert T

I created a database to track my travel expenses. One of the reimbursement
categories is mileage on my own vehicle. The reimbursement rate is not
static, it changes periodically. In light of that, while filling out my
expense form, I would like to click on a button and have another small form
pop up. On this little pop up form, there will be 3 fields:

Total Mileage
Rate
Calculated Total

For example, the user will enter 37 miles in the Total Mileage field, the
reimbursable rate of $.505 in the Rate field. Hopefully Access will multiply
them together and display the amount of money I'm entitled to.

[37 miles] *[$.505] = ?

Any suggestions?

Thanks,
Robert
 
Yes. You can open a small form to do this. I would suggest opening it as a
dialog form. You can put 3 controls on the form. For example, txtMiles,
txtRate, txtTotal

Make the Control Source of txtTotal
=txtMiles * txtRate

Then in the Unload event of the form.

Form!frmExpenses!txtExpense = Me.txtTotal

Use your own names for this.
 
kLATUU:

Thanks so much. Your solution was the kind I like, simple but functional.
I'll let you know if there are any problems.

Robert

Klatuu said:
Yes. You can open a small form to do this. I would suggest opening it as a
dialog form. You can put 3 controls on the form. For example, txtMiles,
txtRate, txtTotal

Make the Control Source of txtTotal
=txtMiles * txtRate

Then in the Unload event of the form.

Form!frmExpenses!txtExpense = Me.txtTotal

Use your own names for this.
--
Dave Hargis, Microsoft Access MVP


Robert T said:
I created a database to track my travel expenses. One of the reimbursement
categories is mileage on my own vehicle. The reimbursement rate is not
static, it changes periodically. In light of that, while filling out my
expense form, I would like to click on a button and have another small form
pop up. On this little pop up form, there will be 3 fields:

Total Mileage
Rate
Calculated Total

For example, the user will enter 37 miles in the Total Mileage field, the
reimbursable rate of $.505 in the Rate field. Hopefully Access will multiply
them together and display the amount of money I'm entitled to.

[37 miles] *[$.505] = ?

Any suggestions?

Thanks,
Robert
 
Sure, post back if you have any problems with it.
--
Dave Hargis, Microsoft Access MVP


Robert T said:
kLATUU:

Thanks so much. Your solution was the kind I like, simple but functional.
I'll let you know if there are any problems.

Robert

Klatuu said:
Yes. You can open a small form to do this. I would suggest opening it as a
dialog form. You can put 3 controls on the form. For example, txtMiles,
txtRate, txtTotal

Make the Control Source of txtTotal
=txtMiles * txtRate

Then in the Unload event of the form.

Form!frmExpenses!txtExpense = Me.txtTotal

Use your own names for this.
--
Dave Hargis, Microsoft Access MVP


Robert T said:
I created a database to track my travel expenses. One of the reimbursement
categories is mileage on my own vehicle. The reimbursement rate is not
static, it changes periodically. In light of that, while filling out my
expense form, I would like to click on a button and have another small form
pop up. On this little pop up form, there will be 3 fields:

Total Mileage
Rate
Calculated Total

For example, the user will enter 37 miles in the Total Mileage field, the
reimbursable rate of $.505 in the Rate field. Hopefully Access will multiply
them together and display the amount of money I'm entitled to.

[37 miles] *[$.505] = ?

Any suggestions?

Thanks,
Robert
 
Back
Top