Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Mar 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access Form (Access 2000)

    In the form view I would like the cursor to appear in my first cell after clicking the next record button on the previous form. I know it has to do with a set.focus but i get lost before and after that.

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

    Re: Access Form (Access 2000)

    I don't know how familiar you are with event procedures, so I'll give a complete description.
    1. <LI>Open your form in design view. Don't select anything on the form.
      <LI>Open or activate the Properties window (View/Properties).
      <LI>Activate the Events tab.
      <LI>Click in the On Current event (it's the first in the list).
      <LI>From the dropdown list, select Event Procedure.
      <LI>Click the Builder button - the button with three dots to the right of the dropdown arrow.
      <LI>You are switched to the Visual Basic Editor. The first and last line of the event procedure have been created for you, and the blinking cursor is in the empty line in between.
      <LI>Hit the Tab key once, then type

      [txtControl].SetFocus

      where txtControl should be replaced by the name of the control you want to set focus to. If you don't know the exact name, switch back to Access and select (click) the control. You will see its name in the Formatting (Form/Report) toolbar and in the caption of the Properties window. Then switch back to the Visual Basic Editor and enter the name followed by .SetFocus. If the name contains spaces, you must enclose it in square brackets (as in the example above, where it is not strictly necessary.)
      <LI>Switch back to Access.
      <LI>Save and close the form.
    Now, the designated control should get the focus when the user navigates to another record.

  3. #3
    New Lounger
    Join Date
    Mar 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Form (Access 2000)

    Thank you very much. It works great.

Posting Permissions

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