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?
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.
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)