|
Question : Access 2007 Combo Box populate multiple fields in form
|
|
Hi everyone. I need help. I have a combo box in my form that i want to populate multiple text boxes after you select your selection in the combo box. Here is my set up.
The Fields that need to be populated are lsited below but must be recorded to a new table. Gets info from Course occurance Table.
Combo Box - Gets Information from Course Occurance Table. This table has all information regarding course information.
Course ID: Course Name: Hours: End Date:
So after the selection is made from combo box. It populates these fields. Combo box gets info from course occurance table. The fields on the form are linked to the grades table on my data base. I want the info pulled from course occurance table then populate it in these fields . Which will then be recorded to the Grades Table. I have the combo box working just i cant figure out how to populate the fields. Please Help.
|
|
Answer : Access 2007 Combo Box populate multiple fields in form
|
|
in the after_update event of the combobox write the values from each column into the textboxes that are bound to your Grades table
Private Sub cboCourse_AfterUpdate() Me.txtCourseID.Value = Me.cboCourse.Columns(0) Me.txtCourseName.Value = Me.cboCourse.Columns(1) Me.txtCourseHours.Value = Me.cboCourse.Columns(2) Me.txtCourseEndDate.Value = Me.cboCourse.Columns(3) End Sub
|
|
|