I use macros instead of code.
Create an unbound textbox and enter default as "Enter % as a decimal",
set the Back Color 12632256, and Special Effect Raised.
For the After Update enter Macro11.MileageUpdate and then in the macro
select action of SetValue. In Item put
[Forms]![YourFormName]![YourMultipliedTextBox]. In Expression put
[Forms]![YourFormName]![YourMultiplierTextBox] *
[Forms]![YourFormName]![YourMileageTextBox].
[Forms]![YourFormName]![YourMultipliedTextBox] -- Where the results will
be displayed
[Forms]![YourFormName]![YourMultiplierTextBox] -- Where you enter the
percentage.
[Forms]![YourFormName]![YourMileageTextBox] -- Where the mileage is from.
Substitue you form object names for those I used.
--
KARL DEWEY
Build a little - Test a little
Amour said:
I have to display the value on the form that was typed in and also I have to
take that value and multiple it by miles, given an amount. Also I don't want
to write to the table (this is just for displaying and mult)...
Example:
Private Sub MilAmt_BeforeUpdate(Cancel As Integer)
Me.Mileage = Me.MilAmt * 0.485
End Sub
But you see I don't want the program to have a fixed value of: 0.458 I want
that value to be changed by the user say something like:
Private Sub MilAmt_BeforeUpdate(Cancel As Integer)
Me.Mileage = Me.MilAmt * [value changed by user]
End Sub
I also want that value to be display on the form....
I guess it would be something that you click on and that gives you a prompt
to enter in a percentage.
please help and thank you!
:
Take that same value and multiple it by the miles.
Where are you going to put the value of this calculation?
--
KARL DEWEY
Build a little - Test a little
:
Thank you for your help. I don't understand what you mean.
Basically I want to change what they see in the text box (or command button)
to what the user typed in. Could you show me an example of an event that
will change on the form? by the user....
Thank You for any help....
:
Do not use a label (caption) but change the appearance of a textbox. Create
an event so that on update is sets value of your mileage times percent.
--
KARL DEWEY
Build a little - Test a little
:
Hi I am new to Access/VBA. Anyway this is the problem I am having:
I want to click on a button (within a form). Be prompted for a percent of
milage. Example: 0.485 or 0.455, then click ok and it change the caption
(display) on the command button to that value. Take that same value and
multiple it by the miles.
Please help and thank you!