Hello everyone,
I am new to Access and trying to do this.
I have got two combo boxes. One is dependant on another one. They two are working fine. Now I am trying to add a text field which is for prices. If the second combo box selects any option, the adjacent price should appear in this text box which is not happening with simple coding like linking two columns together and then selecting second column and so on. This step works but only when combox box 2 is left untouched. Otherwise if choice is made in combo box 2, text field goes empty.
Here is my code for the dependant combo box (the second one):
This code is just to show what has been done to combo box 2.
Private Sub cmbres_AfterUpdate()
Dim strSource As String
strSource = "SELECT Item" & _
"FROM TBL_items " & _
"WHERE RestaurantName = '" & Me.cmbres & "' ORDER BY Branch"
Me.itm1.RowSource = strSource
End Sub
"Item"=column inside "TBL_items" table, "RestaurantName" another column. "cmbres" is this combo box (1st one) and "itm1" is the second one where it shows specific choices to choose.
I am looking for help! Thanks in advance