Hello all,
I have reviewed some of the other posts regarding combo boxes and populating the form from the combo box but I am still experiencing an issue with one that I created for a project.
The issue:
I have setup a table called students, studentID is the key, when I select the studentID in the combo box only three of the text boxes are being populated. My code is below; any suggestions would be appreciated.
Regards,
Greg
I have reviewed some of the other posts regarding combo boxes and populating the form from the combo box but I am still experiencing an issue with one that I created for a project.
The issue:
I have setup a table called students, studentID is the key, when I select the studentID in the combo box only three of the text boxes are being populated. My code is below; any suggestions would be appreciated.
Regards,
Greg
Code:
Private Sub cboStudentID_AfterUpdate()
Me.StudentID = Me.cboStudentID.Column(0)
Me.txtFirstName = Me.cboStudentID.Column(1)
Me.txtLastName = Me.cboStudentID.Column(2)
Me.txtAddress = Me.cboStudentID.Column(3)
Me.txtCity = Me.cboStudentID.Column(4)
Me.txtState = Me.cboStudentID.Column(5)
Me.txtZipCode = Me.cboStudentID.Column(6)
'Fill in fields by using the DLookup()
End Sub
Comment