G
Guest
Hello Again,
I'm back. If Microsoft charged for the use of this forum they would be rich
off of me alone.
Anyway, here's another scenario I find myself in again.
I have this line of code in the AfterUpdate event of a button named
"btnAdd". The code is supposed to check if a selection has been made in a
Combo Box named "cboEmp_Name". If no selection was made it's supposed to exit
the Sub routine. Well, it ain't workin'.
If Me.cboEmp_Name.Value = Null Then
MsgBox "Please enter Employee Name.", vbExclamation, "Can't add records"
Exit Sub
End If
When I use:
Debug.Print Me.cboEmp_Name.Value
It displays the correct value of cboEmp_Name, but when the code runs the IF
test fails and the underlying code executes anyway. Does anyone know why this
happens?
-Simon
I'm back. If Microsoft charged for the use of this forum they would be rich
off of me alone.
Anyway, here's another scenario I find myself in again.
I have this line of code in the AfterUpdate event of a button named
"btnAdd". The code is supposed to check if a selection has been made in a
Combo Box named "cboEmp_Name". If no selection was made it's supposed to exit
the Sub routine. Well, it ain't workin'.
If Me.cboEmp_Name.Value = Null Then
MsgBox "Please enter Employee Name.", vbExclamation, "Can't add records"
Exit Sub
End If
When I use:
Debug.Print Me.cboEmp_Name.Value
It displays the correct value of cboEmp_Name, but when the code runs the IF
test fails and the underlying code executes anyway. Does anyone know why this
happens?
-Simon