Record operations and focus - Bug fix needed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Microsofts' "go to New record" button is reasonably consistent in applying
the focus to the first field when opening that new record. However, these
buttons are much too small and fiddly, and when the user inserts his own new
record command button from the toolbox - record Operations, the new form
always opens without any focus at all until the user clicks into a field. I
have even tried this with forms in Microsoft's provided sample databases with
identical results.

Keith
 
Kevryl said:
Microsofts' "go to New record" button is reasonably consistent in applying
the focus to the first field when opening that new record. However, these
buttons are much too small and fiddly, and when the user inserts his own new
record command button from the toolbox - record Operations, the new form
always opens without any focus at all until the user clicks into a field. I
have even tried this with forms in Microsoft's provided sample databases with
identical results.

Keith

I think you'll find that there is a focus - it's on the New Record command
button, which is where the user last clicked! Access will not change the
focus to another control unless you tell it to. You can do this by
modifying the code created by the wizard thus, where SomeControl is the
control you want to have the focus:

DoCmd.GoToRecord , , acNewRec
SomeControl.SetFocus

I always encourage users to use the keyboard, it's quicker than using the
mouse. "Ctrl+" is the keyboard shortcut for a new record, and it behaves
exactly as the new record button on the built-in navigation buttons.
 
Back
Top