G
Guest
Hi,
I have a combo box with student names in it. Each student name has a unique
ID attached "StudentID". If the current record ID belongs to student named
"Holly", I need to prevent the user from switching "Holly" to a different
student ID.
I have public variable which gets current value of StudentID:
Private Sub cboStudent_GotFocus()
Dim lngEmpID as Long
If Not IsNull(Me.cboStudent.Value) Then
lngEmpID = Me.cboStudent.Value
End If
End Sub
Now, I need to somehow compare value of lngEmpID to the changed value to see
if they match. If they dont match, I want to stop the ID switch.
How can i do this?
I have a combo box with student names in it. Each student name has a unique
ID attached "StudentID". If the current record ID belongs to student named
"Holly", I need to prevent the user from switching "Holly" to a different
student ID.
I have public variable which gets current value of StudentID:
Private Sub cboStudent_GotFocus()
Dim lngEmpID as Long
If Not IsNull(Me.cboStudent.Value) Then
lngEmpID = Me.cboStudent.Value
End If
End Sub
Now, I need to somehow compare value of lngEmpID to the changed value to see
if they match. If they dont match, I want to stop the ID switch.
How can i do this?