Calculators + combos

Sean_Sean

Registered User.
Local time
Today, 23:37
Joined
Jan 24, 2002
Messages
16
I have 2 combo-boxes, first the user must select a value out of the first one and the something out of the second one. In the second one i want the price to be there but so the user cannot see it so that when they select something they are also selecting the price colomn that i can use a text box to do simple calculaton of multiplying it with another text box.

How can i do this?
 
Include the price column in the query used as the rowsource for the second combo. Then in the combo's AfterUpdate event:

Me.txtResult = Me.SecondCombo.Column(1) * Me.SomeOtherField

The columns of the combo's rowsource are a zero based array. So .Column(1) is actually the second column in the query. If price is not the second column, adjust the column index accordingly.
 
What does the "someotherfield" refer to?
 
sorry you mis-understood:
The drop-down arrow contains a hidden column, in one text box (called totadults) i want to end up with a price by multiplying another text box by the hidden colomn of the drop-down arrow.
 
Set the width of the Price column of your combo box to 0. It should become effectively invisible then.

It'll probably be something like 0;1.78;0 in the properties.

HTH,
David R
 
Does this make it clearer?

Me.totadults = Me.SecondCombo.Column(1) * Me.[another text box]
 

Users who are viewing this thread

Back
Top Bottom