Results 1 to 4 of 4
  1. #1
    Shag84 is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    18

    Changing focus on a form

    Hello,

    I have a search form that has:


    1) combo box displaying the different fields that can be searched.
    2) a text box used to enter a string to be searched for in the chosen field
    3) a command button that executes the search

    What I would like to know is how do I change the focus to the text box after making a choice in the combo box, and then be able to hit Enter to activate the command button.

    I hope I've explained this properly. Thanks for your help.
    Don

  2. #2
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    481
    First thought: Visual Basic: use the "Change" or "afterupdate" event for the Combo box to set the focus to the text box. After completing the text box, hit the button to complete the process.
    Hertfordkc

  3. #3
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    481
    Oh...and an "afterupdate" event for the text box should allow and "enter" to substitute for hitting the button.

  4. #4
    Shag84 is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    18
    Sorry for the late reply.

    I appreciate your help. Thanks,
    Don

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

Similar Threads

  1. Lock Focus on the Current Form
    By injanib in forum Forms
    Replies: 6
    Last Post: 05-29-2011, 04:22 AM
  2. Grow text box on form with focus
    By Karen H in forum Forms
    Replies: 5
    Last Post: 02-25-2011, 12:03 PM
  3. Any change of focus on form Event?
    By trb5016 in forum Forms
    Replies: 1
    Last Post: 02-11-2011, 08:25 PM
  4. Replies: 1
    Last Post: 12-10-2009, 09:58 PM
  5. Setting Focus on a Form
    By MFeightner in forum Forms
    Replies: 1
    Last Post: 07-30-2009, 07:49 AM

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