Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2006

    Unanswered: Setting Focus to beginning of an Access Form

    I am a relative newbie and am having trouble designing my data/entry form. When you first go into this main form, the focus is set to the initial contol ("ID"). That is fine! This main form also contains a subform (Alternate Address subform) where the first control in it is also named "ID". The problem is that when I click on the add new record symbol (*), the focus is not redirected to the top of the main form where the first "ID" control resides. Is there a way to set my database up so that I do not have to click in the first "ID" control every time I want to start adding a new record?

    Thanks in advance for any help you can give me.

  2. #2
    Join Date
    Jul 2005
    Let me see if this makes sense
    In my database i have a macro running using a button on the main form which by clicking moves the main form to a new record so make a macro and tell it to go to new record and attach it to a button.

  3. #3
    Join Date
    May 2005
    You may want to check out your tab order. Put the item you want first at the top of the order.
    Me.Geek = True

  4. #4
    Join Date
    Nov 2004
    In the (main) forms on current event, enter


    Don't know how?

    In design view for the form, enter the properties dialog, find the event tab, and the on current event property. When the cursor is within the property, hit the button with three dots, select Code builder, and you should be thrown within the event procedure of this event in the VBE. There you should be able to paste the above statement. With a bit of luck, it might even work.

    There will often be recommandations to alter the name of controls, at least those you refer to in code or expressions, so that they differ from the name of the field they are bound to. That's supposed to help reduce the number #Name errors. The usual naming convention is prefixing text controls with txt, combos with cbo, list boxes with lst, check boxes with chk ... (Me!txtID.SetFocus)

Posting Permissions

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