A
Ac
Hi,
I created a combo box named cboStudentID on the form fStudents, I would like
to select a studentID from the cboStudentID, and retrieves the corresponding
record from the Students table and displays in the form fStudents. Now the
cboStudentID picks up studentID, studentName, curEmployer from the Students
table and Bound Column is 1 (StudentID), it is works well. But after I made
the selection from the cboStudentID, no records displayed in the form, what
is wrong? Please help me. Thanks!
Here is the code for cboStudentID:
Private Sub cboStudentID_AfterUpdate()
‘Form Record Source
Me.RecordSource = "Select * from Students Where StudentID = " +
CStr(Me!cboStudentID)
End Sub
I created a combo box named cboStudentID on the form fStudents, I would like
to select a studentID from the cboStudentID, and retrieves the corresponding
record from the Students table and displays in the form fStudents. Now the
cboStudentID picks up studentID, studentName, curEmployer from the Students
table and Bound Column is 1 (StudentID), it is works well. But after I made
the selection from the cboStudentID, no records displayed in the form, what
is wrong? Please help me. Thanks!
Here is the code for cboStudentID:
Private Sub cboStudentID_AfterUpdate()
‘Form Record Source
Me.RecordSource = "Select * from Students Where StudentID = " +
CStr(Me!cboStudentID)
End Sub