v lookup problem
Greeting,
I have an excel sheet for inputting employees data. In this sheet there is a
command to open a form to input data and there is a textbox which is employee
id. What I want to do is to check the employee id if it is already excess, a
msgbox shows and tell the user that it is already excess any should be
change. There is a problem with my code but I don't where it is.
Can any body help me please?
Private Sub TextBox3_Change()
If Not IsNull(vLookup("[ID]", "[Data]", "[ID] = " & [TextBox3])) Then
MsgBox "Sorry€¦ the ID is already input please reenter the Id " _
, vbOKOnly + vbCritical, _
"Duplicated ID"
DoCmd.CancelEvent
End If
|