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:
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: