Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Melbourne, Australia
    Posts
    118
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Entry Order (Access 2000)

    Hi Everyone,

    Is there an option on a form:
    I have a command button "add new record"
    I have setup my tab order to go from the top field down to the buttom.

    When I click the command button it clears all the field ready for entry - however the cursor still stays on the command button.
    I would like the cursor to move to the first field in the tab order.

    Does that make sense????

    Thanks Kindly,

    Kerrie [img]/forums/images/smilies/smile.gif[/img]

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Entry Order (Access 2000)

    You can use the SetFocus method to activate a control.

    Add a line like the following at the end of the OnClick routine of the command button:

    [NameOfControl].SetFocus

    where NameOfControl is the name of the control you want to activate.
    Note: use the name of the control, not the name of the field.

  3. #3
    New Lounger
    Join Date
    Jul 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Entry Order (Access 2000)

    or
    docmd.gotocontrol"name of control"
    Ashraf

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Entry Order (Access 2000)

    DoCmd works but is not as reusable as the SetFocus method, which can be used in VB as well as all flavors of VBA.
    Charlotte

  5. #5
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Melbourne, Australia
    Posts
    118
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Entry Order (Access 2000)

    Excellent.

    Thank you Hansv.

    Kerrie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •