novicetech1
09-14-2012, 01:30 PM
Hi All -
First time here as a member, though I've learned lots from the site just browsing. Anyway, I have a userform that tracks travel expenses. I have a textbox for mileage, one for mileage rate paid, one for lodging and one for meals. At the moment I have the calculation in a command button called "Add New Record". When the button is clicked, the calculation is executed and the value appears in the "Totals" textbox (txtTotCost).
My question is: is there a way to make the value appear in the "Totals" textbox before the user hits submit? I have built in a way to edit or delete records after they have been submitted, but it just seems like the right approach to display all of the data prior to submitting.
At present, I do not have any code in the txtTotCost textbox. Here is the code I have in the "Submit" button:
txtTotCost.Value = "$" & (Val(Me.txtMileage.Text) * Val(Me.txtRate.Text)) +
Val(Me.txtLodging.Value) + Val(Me.txtMeals.Value)
I appreciate any help you can offer. Thanks.
First time here as a member, though I've learned lots from the site just browsing. Anyway, I have a userform that tracks travel expenses. I have a textbox for mileage, one for mileage rate paid, one for lodging and one for meals. At the moment I have the calculation in a command button called "Add New Record". When the button is clicked, the calculation is executed and the value appears in the "Totals" textbox (txtTotCost).
My question is: is there a way to make the value appear in the "Totals" textbox before the user hits submit? I have built in a way to edit or delete records after they have been submitted, but it just seems like the right approach to display all of the data prior to submitting.
At present, I do not have any code in the txtTotCost textbox. Here is the code I have in the "Submit" button:
txtTotCost.Value = "$" & (Val(Me.txtMileage.Text) * Val(Me.txtRate.Text)) +
Val(Me.txtLodging.Value) + Val(Me.txtMeals.Value)
I appreciate any help you can offer. Thanks.