Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / November 2007

Tip: Looking for answers? Try searching our database.

Keycode capture on Login form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ken Warthen - 30 Nov 2007 16:57 GMT
I have a login form I've created for an Access 2007 database.  There are
three controls on the form; a username and password textbox, and a command
button.  When a user enters his name and password and then clicks on the
command button I have code that validates the username and password, and if
correct allows the end user access to the database.

I would like the end user to be able to hit the [ENTER] key after typing in
his password and have that keystroke invoke the code for the command button.  
In it's current state the end user must tab to the command button and click
it to invoke the login process.  This seems like a couple of unnecessary
steps.  Can anyone give me direction on how to proceed?

TIA,

Ken Warthen
kenwarthen@gmail.com
Jeff Boyce - 30 Nov 2007 18:30 GMT
Ken

One approach would be to add code to the Exit event of the Password control.
That code would "click" the button.

Regards

Jeff Boyce
Microsoft Office/Access MVP

>I have a login form I've created for an Access 2007 database.  There are
> three controls on the form; a username and password textbox, and a command
[quoted text clipped - 16 lines]
> Ken Warthen
> kenwarthen@gmail.com
Ken Warthen - 30 Nov 2007 22:29 GMT
Jeff,

Thanks for the help.  I wouldn't have guessed that the Exit event would fire
when the [ENTER] key is pressed, but it works.

Ken

> Ken
>
[quoted text clipped - 26 lines]
> > Ken Warthen
> > kenwarthen@gmail.com
Jeff Boyce - 30 Nov 2007 23:58 GMT
Ken

It works if you have Access set to leave the control when you press <Enter>.
Likewise, it will work if you press <Tab>, or use your mouse to click
elsewhere.

Regards

Jeff Boyce
Microsoft Office/Access MVP

> Jeff,
>
[quoted text clipped - 40 lines]
>> > Ken Warthen
>> > kenwarthen@gmail.com
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.