Autologin

scallebe

Registered User.
Local time
Today, 18:41
Joined
Mar 23, 2018
Messages
51
Hi everybody,

I have a database with login form.

After password input I click the OK button and de DB starts running. No problem so far.

What I like to do is run my "OK" code after input my password without clicking the ok button. (e.g. like the windows pincode to login)

Is there a way that access recognize the correct users password and continues the "OK" code after input the last letter or number from the password?

Thanks

Greetz

Pascal:cool:
 
only by having a fixed number of characters (like a 4 digit pin). when the number of characters has been entered, the code would go check to see if the password is valid.

only other way would be to use the form timer event - code would go check the password say 0.5 seconds after the user has stopped typing
 
You could use the after update event of the password textbox; that would require the user to hit Tab or Enter after their password.
 
Hi Pascal. I agree with CJ, how would you know the user has completed entering their password, if users have different password lengths or different number of characters in their password? But if you want to use the Enter key to signal that they're done entering their password, then you could simply try setting the OK button's Default property to Yes.
 
CJ London, Pbaldy,

Thanks for reply.:)

Pressing Tab or enter is just that what I want to prevent.

I placed my "OK" code in the timer event. interval is 10000

Because I have a few securities bild in like login or password can not be empty, password change recuired after first login,... after 10 seconds He keeps asking me to set my password (I created that msgbox) For access the password field is empty.

So probably I'm gonna have to ad some code, like a if statement... Or am I thinking wrong?

Can you help me a little further with the timer event? :rolleyes:

Thanks a lot

Greetz

Pascal:cool:
 
DBGuy

The user can already use the enter tap or the OK button and there is no problem to use it like this. :)

Of course you need to confirm your Password one way or the other otherwise access concider the field empty.

I'm experimenting and I was wondering if it was possible.

I'm learning you see… :(


Thanks

Greetz

Pascal:cool:
 
In the txtPassword_AfterUpdate event code add the line cmdOK_Click where cmdOK is the name of your OK button ….or just copy/move the cmdOK_Click event code in its entirety to the txtPassword_AfterUpdate event
 
DBGuy

The user can already use the enter tap or the OK button and there is no problem to use it like this. :)

Of course you need to confirm your Password one way or the other otherwise access concider the field empty.

I'm experimenting and I was wondering if it was possible.

I'm learning you see… :(


Thanks

Greetz

Pascal:cool:
Hi Pascal. Given enough code, almost anything is possible. Cheers!
 
in the txtPassword control change event put

me.timerinterval=300 '3 tenths second (usually sufficient)

in the form timer event put

me.timerinterval=0 'so action is not repeated untile user enters another character
followed by the code that checks the validity of the user

since the txtPassword still has the focus you need to refer to it's text property because the value has not been saved. so might be something like

if dcount("*","tblUsers","UserName='" & txtUser & "' AND password='" & txtpassword.text & "'")=0 then 'entry not valid
...
...
 
CJ,

Thanks for reply :)

Where do I place the "if dcount(…..

After the me.timerinterval = 0 in the timer event? Followed withe the rest of my code?

Thanks

Greetz

Pascal:cool:
 
Where do I place the "if dcount(…..

After the me.timerinterval = 0 in the timer event?
yes. But the 'if dcount(...' was my illustration of what your code might look like and to demonstrate the use of .text - it is not a requirement. Your code might be completely different
 

Users who are viewing this thread

Back
Top Bottom