When I try to populate a form's fields from a combobox it works ok for the first of the two fields being populated all the time but it only works the first time for the second field being populated.
The combobox has vendor name, item no, and description. When I enter a new record all is well unless I try to correct an error by going back and selecting another choice from the combobox. Then, Only the item number is correctly chosen. The description stays the same as the previous choice.
for example .. I choose from the combobox Joe, 1234, apples.
If I go back to the combo box because I should have chosen Joe, 4321, oranges, only Joe and 4321 are correct the description field will retain the apples description.
I’m sure it’s something really simple but I’m very new to this and have only found information on populating 2 fields instead of three
Here is the code I used.
Option Compare Database
Private Sub Combo23_AfterUpdate()
Me.Item_No = Me.Combo23.Column(1)
Me.Description = Me.Combo23.Column(2)
End Sub
Private Sub Combo23_BeforeUpdate(Cancel As Integer)
End Sub
The combobox has vendor name, item no, and description. When I enter a new record all is well unless I try to correct an error by going back and selecting another choice from the combobox. Then, Only the item number is correctly chosen. The description stays the same as the previous choice.
for example .. I choose from the combobox Joe, 1234, apples.
If I go back to the combo box because I should have chosen Joe, 4321, oranges, only Joe and 4321 are correct the description field will retain the apples description.
I’m sure it’s something really simple but I’m very new to this and have only found information on populating 2 fields instead of three
Here is the code I used.
Option Compare Database
Private Sub Combo23_AfterUpdate()
Me.Item_No = Me.Combo23.Column(1)
Me.Description = Me.Combo23.Column(2)
End Sub
Private Sub Combo23_BeforeUpdate(Cancel As Integer)
End Sub