How to Set Focus to Menu Form at Login?

D

David Salahi

I have a login form which closes itself after login and opens a reminder
form. The reminder form checks to see if any reminders need to be displayed
and, if not, then opens the main menu form. In a typical scenario there are
no reminders and the user never sees the reminder form. The login form closes
and the menu form appears.

If the user then clicks a button on the menu form, the appropriate action
takes place. BUT if the user hits the <Enter> key some seemingly random form,
table or report opens. I've figured out that the problem is that the menu
form does not have the focus. Instead, the focus is on an object in the
navigation pane. This is true even though I have hidden not only the Nav pane
but all objects within it!!

I can see that the menu form does not have the focus at this time and if I
click on the form (not a button in the form) to set the focus to it and then
hit enter, the action corresponding the button with the focus occurs, as
expected. But since the focus is not normally on the menu form after login,
some random table or form (whatever was last selected when I was working in
the Nav pane) opens.

Needless to say, a user could end up looking at some strange (to them) table
and could potentially do a lot of damage to the DB. How can I avoid this
behavior? Is there a way to set the focus to the menu form??

David Salahi
 

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