Hi, i'm pretty new to proggraming and this task is probably really simple so sorry.
Well i am trying to edit the cost of a selected item this is part of a homework assignment by the way. Well i would like to select the item from the combo box and then type the new price for the item in a text box and by pressing a command button the new price will be displayed in the label
CODE
Private Sub Form_Load()
cboEditCost.AddItem "Bread"
cboEditCost.AddItem "Milk"
End Sub
Private Sub cmdEditCost_Click()
If cboEditCost.Text = "Bread" Then
lblPriceBread = Val(txtEditCost)
ElseIf cboEditCost.Text = "Milk" Then
lblPriceMilk = Val(txtEditCost)
End If
End Sub
The problem i think i'm having is recognising the item from the combo box any help will be much appreciated.
Thank You S.S.GHT