- Jan 5, 2001
- 3,144
- 10
- 81
I have to access a sequential file that has to fields in it separated by a comma (obviously). The first field is placed in the combo box at Form Load time. I have that done. How ever when I click on an item in the combo box I need the information from the second field that corresponds with the item chosen.
Private Sub cbo1_Click()
Open AppPath & FileName For Input As 1
Input #1, mstrMeal
Input #1, msngPrice(4)
lblUnitP1.Caption = msngPrice(cbo1.ListIndex + 1)
txtQuantity1.Text = 1
Close 1
End Sub
I need it so that when you choose a meal in the combo box the price (second field) shows up in the lblUnitP1.caption.
Am I correct in setting up an array with msngPrice(4)?
Private Sub cbo1_Click()
Open AppPath & FileName For Input As 1
Input #1, mstrMeal
Input #1, msngPrice(4)
lblUnitP1.Caption = msngPrice(cbo1.ListIndex + 1)
txtQuantity1.Text = 1
Close 1
End Sub
I need it so that when you choose a meal in the combo box the price (second field) shows up in the lblUnitP1.caption.
Am I correct in setting up an array with msngPrice(4)?