Solved Disable 'Enter' key for Login form (1 Viewer)

Waka0212

New member
Local time
Today, 13:41
Joined
Oct 30, 2019
Messages
17
Ok, greetings all and thank you for reading. I have a login form and it's working as intended, mostly. The issue I have is that when someone attempts to login and instead of using the 'Login' button which houses all the code they naturally hit 'Enter'. This however does not login as their intended action. It actually trys to save the record inside the login data table and will actually overwrite the first saved login and will cause the database to leave the login info in the text fields of the login form instead of clearing the fields, allowing anyone to press the login button and gain access. So the question(s) is, is it possible to disable the 'Enter' key from doing anything either on just that form or even all together. The 'Enter' key is not used in the database. Or, is it possible to link the 'Login' button and the 'Enter' key to do the same action? I was able to go through the options and stop movent for the 'Enter' key when pressed, but this only works for each user and not the database. I am open to other suggestions as well. Please and thank you for the assist.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:41
Joined
Oct 29, 2018
Messages
21,454
Hi. Go to your Form's Design View and select the Login button. Go to the Property Sheet Window and look for the Default (Not Default Value - just Default) property (under the Other tab) and set it to Yes.

Hope that helps...
 

Waka0212

New member
Local time
Today, 13:41
Joined
Oct 30, 2019
Messages
17
Ok, thanks for the quick reply! I'll give that a try in the morning and report back.
 

Waka0212

New member
Local time
Today, 13:41
Joined
Oct 30, 2019
Messages
17
@theDBguy, yup, that did it. Pressing 'Enter' key now acts like pressing the 'Login' button. Appreciate the quick and easy fix!
 

Minty

AWF VIP
Local time
Today, 18:41
Joined
Jul 26, 2013
Messages
10,368
Another possible option is to set the form to cycle round only the current record, that way it doesn't try and leave the record forcing the save.
It's under the form properties "other" tab property is Cycle - Set it to "Current Record"
 

Users who are viewing this thread

Top Bottom