Combo box

S

Swansie

I have a combo box with with the numbers 6 and 12 in it located next to a
unit price on a form...When 6 is selected i want the unit price to be
multiplied by 2 and when 12 is selected unit price multiplied by one... ideas?
 
K

Krizhek

I have a combo box with with the numbers 6 and 12 in it located next to a
unit price on a form...When 6 is selected i want the unit price to be
multiplied by 2 and when 12 is selected unit price multiplied by one... ideas?
 
G

Garret

That wouldn't work Krizhek. If it were 6, then it would be multiplied
by 1/2 instead of 2.

Try putting this code under the "combo box"_before update event:

If [combo box] = "6" then
[unit price] = [unit price] * 2
End if

Try it without the quotation marks if this doesn't work for you, I
forget which is needed at the moment.
 
Top