friends,
I have coded in my textbox's lostfocus event to check whether a particular entry already exists in the table. it gives correct result but when u click the ok button, it doesnt get tab focused in the first textbox. instead it focuses on second textbox which is meant for password. the code is given below:
Private Sub Text1_LostFocus()
Dim uname As String
uname = Me!Text1
If uname = DLookup("[PEN]", "USERS", "[PEN]=" & Me!Text1.Value) Then
Me!Text1 = ""
Me!Text1.SetFocus
MsgBox ("USER ALREADY EXISTS")
Else
End If
End Sub
can anyone help correct this.
thanking you in advance
ramesh