Results 1 to 5 of 5
  1. #1
    swenger is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2016
    Posts
    151

    Set Focus to a field on Form Load


    How would I use the setfocus property to have a specific field get the focus when a form is loaded.

  2. #2
    Bulzie is online now VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    Me.YourField.Setfocus in the OnLoad Event

  3. #3
    swenger is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2016
    Posts
    151
    I think I got it to work. I simply put field.setfocus in the vba for the FormLoad

  4. #4
    swenger is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2016
    Posts
    151
    Quote Originally Posted by Bulzie View Post
    Me.YourField.Setfocus in the OnLoad Event
    Thanks. I noticed that it works without the Me. On many posts everyone always adds the Me. If the code works without this, what is the benefit with including this.

  5. #5
    Bulzie is online now VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    Maybe later versions don't need, habit I guess.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 12-23-2015, 08:45 AM
  2. Replies: 9
    Last Post: 08-13-2014, 07:55 AM
  3. Replies: 17
    Last Post: 03-16-2014, 10:52 PM
  4. Load form from datasheet and set focus
    By Dulanic in forum Forms
    Replies: 3
    Last Post: 03-26-2012, 08:30 AM
  5. HELP! Set Focus to Continuous Sub Form Field
    By asmith78 in forum Programming
    Replies: 1
    Last Post: 09-09-2011, 02:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums