Sean_Sean
02-04-2002, 09:55 AM
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?
Pat Hartman
02-04-2002, 10:05 AM
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.
Sean_Sean
02-04-2002, 10:12 AM
What does the "someotherfield" refer to?
Sean_Sean
02-04-2002, 10:22 AM
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.
Sean_Sean
02-05-2002, 10:36 AM
Any other help? The above doesn't seem to work.
David R
02-05-2002, 11:57 AM
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
Pat Hartman
02-05-2002, 07:05 PM
Does this make it clearer?
Me.totadults = Me.SecondCombo.Column(1) * Me.[another text box]