Password textbox autotab

A

Antonio

Dim intGoodPW As Integer
Dim intCurrentPW As Integer
Dim strCurrentPW As String
Dim strGoodPW As String

strGoodPW = Password
intGoodPW = Len(strGoodPW)
strCurrentPW = txtPassword.Text
intCurrentPW = Len(strCurrentPW)

If intCurrentPW = intGoodPW Then
If txtPassword.Text = DLookup _
("Password", "tblLogin", "[UserName]='" & Me.Username & "'") Then
cmdOK.SetFocus
MsgBox "Password length=" & intGoodPW & vbCrLf & _
"Current Password length=" & intCurrentPW
Else
'leave here
End If
End IfGood morning everybody...Here's my question:
On my login form, I would like users to enter their password and, when the
password typed is correct and it reached the length of the password stored
in the table, I would like to set the focus to another control automatically
without having the user click or tab to another control. This is what I have:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top