Results 1 to 4 of 4
  1. #1
    DenShin is offline Novice
    Windows 10 Office 365
    Join Date
    Aug 2023
    Posts
    8

    Post Dashboard>NavButton>Form>Textbox.Setfocus?

    As Subject title show I want to set the focus to the text box after I click a navigation button. Since I assign the Navigation Target Name > to another form I have designed.

    Here is the structure:



    • m_dash(mainform where navigation buttons holds)


    1. Nav1 Button - Navigation Target Name > f_assign (form)


    • textbox.setfocus (inside the form or f_assign)


    1. Nav2 Button - Navigation Target Name > f_settings (form)


    • Textbox.setfocus (inside the form or f_settings)



    I want the set focus will automatically kick in to my choice text box to focus on whenever I click my navigation button.


    Thanks in ADVANCE.

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Set that control as the first in the tab order for each form or set focus on Form Load event.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    DenShin is offline Novice
    Windows 10 Office 365
    Join Date
    Aug 2023
    Posts
    8
    Quote Originally Posted by Welshgasman View Post
    Set that control as the first in the tab order for each form or set focus on Form Load event.
    Thank you for the response. I already did the 1st at the tab order and from the load event I already declared the set focus to the first text box
    . However, I want the cursor must be already inside the text box to begin the typing for information. As I have done your advice it only select the text box but still I need to tap the tab button for the cursor to appear inside the box. Is there any other way around this request? Thanks in Advance

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    Depends on where you want the cursor to appear - at the start?, the end? Or somewhere in the middle

    Investigate the selstart, sellengh properties

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

Similar Threads

  1. Replies: 21
    Last Post: 09-28-2021, 09:18 AM
  2. Replies: 1
    Last Post: 02-05-2017, 07:44 AM
  3. Replies: 16
    Last Post: 01-10-2014, 06:03 PM
  4. setfocus on an textbox different way
    By white_flag in forum Access
    Replies: 0
    Last Post: 09-21-2011, 05:04 AM
  5. setfocus on an textbox
    By white_flag in forum Access
    Replies: 2
    Last Post: 09-21-2011, 04:16 AM

Tags for this Thread

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