danaleblanc
11-09-2001, 04:21 AM
Have a check box called 'rush orders'
Have a currency field called 'unit price'
Want value in unit price to increase 30% if check box is selected.
Any help is grateful.
The_Doc_Man
11-09-2001, 05:10 AM
I've never used a currency format explicitly before, but here is how I would approach it.
You need a third box, maybe invisible, that is the REAL price of the item.
Resources:
[Rush Orders]: checkbox, True or False
[Unit Price]: text box, Currency format
[Real Price]: text box, Currency format, .visible = false
On the form, in a couple of places, put this snippet of text (I'll tell you where in a second...)
If [Rush Orders] Then
[Unit Price] = [Real Price] * 1.3
Else
[Unit Price] = [Real Price]
End If
Now, put this code in event routines as follows:
1. Form_Current
2. Rush_Orders_Click
3. Unit_Price_GotFocus
4. Unit_Price_LostFocus
danaleblanc
11-14-2001, 04:37 PM
This code did not work. Do you have another method?