Unanswered: display combo box value at Form load event isue
Hi community experts,
May I knw hw can the values of the combo box be displayed at combo box afterupdate event. I want to achieve in such a way whereby at the form load the value displayed at the combo box will be displayed at the textboxs as well.
Let say S1 happens to be displayed in form load, which mean that values (StudentId, name) corresponding to S1 will be displayed as well.
In the query that is the Row Source for the combo box, you can define multiple columns. Then in the properties for the combo box, under the Format tab, you can specify how many columns are used within this combo box. Then in the AfterUpdate event you can move the second column into the Name text box. The code for that move would look like this:
Name = Combo1.Columns(1)
Yes, it is column 1, NOT column 2. The count of columns starts with 0. Look under Columns in the VBA help for more info.
The AfterUpade event does NOT have a Cancel parameter, the BeforeUpdate event has a Cancel parameter.