If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Display first value of the combo box
hi, i have a question about the combo box. I have make two combo box in a
subform. one is choose the part. the second is the price. now i wanna when i choose the part, if the part just have one price, then i want the price which is in the second combo box will directly show me the price. if the part have many type of price (due to different qty, so have different price), then the user just go to select the price for that part. anybody can help me? thanks! |
#2
|
|||
|
|||
Display first value of the combo box
Irene,
each item in a combo's list has a number, starting with 0 for the first one. You can count how many items in the list, if there is only one, you can tell the combo to show it. In the after update event of the parts combo, or the enter or got focus event for the price combo, put some code like this: If Me.ComboPrice.ListCount = 1 Then Me.ComboPrice = Me.ComboPrice.ItemData(0) End If Jeanette Cunningham "Irene" wrote in message ... hi, i have a question about the combo box. I have make two combo box in a subform. one is choose the part. the second is the price. now i wanna when i choose the part, if the part just have one price, then i want the price which is in the second combo box will directly show me the price. if the part have many type of price (due to different qty, so have different price), then the user just go to select the price for that part. anybody can help me? thanks! |
Thread Tools | |
Display Modes | |
|
|