technocraze
02-07-2007, 06:35 AM
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.
Combo box - StudentId (unbounded)
TextBoxes - StudentId (unbounded)
name (unbounded)
Private Sub Combo1_AfterUpdate(Cancel As Integer)
Dim stud As Variant
stud = DLookup("IStudentId", "Student", "StudentId = '" & Me.Combo1.Column(0) & "'")
Me.StudentId.Value = stud
End Sub.
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.
Combo box - StudentId (unbounded)
TextBoxes - StudentId (unbounded)
name (unbounded)
Private Sub Combo1_AfterUpdate(Cancel As Integer)
Dim stud As Variant
stud = DLookup("IStudentId", "Student", "StudentId = '" & Me.Combo1.Column(0) & "'")
Me.StudentId.Value = stud
End Sub.