Results 1 to 10 of 10
  1. #1
    2 Star Lounger
    Join Date
    Jan 2008
    Location
    Wheaton, Illinois, USA
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Active cell in new record (2003 SP3)

    Can I set my form to always make a certain cell active, so I can begin data entry without using the mouse with each new record? I may need a step by step. If you mention a design view tool, could you please describe the symbol?

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Active cell in new record (2003 SP3)

    In design view for your form, open your form's properties by double clicking on the little black square located at the top left intersection of your horizontal and vertical ruler bars. Click the Event tab and click the On Open event wizard helper which is the small box on the right of that row containing three dots. Type the following code for your procedure: Me.FieldName.SetFocus

    Replace FieldName with the name of the field you want to have the focus when your form opens.
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

  3. #3
    2 Star Lounger
    Join Date
    Jan 2008
    Location
    Wheaton, Illinois, USA
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Active cell in new record (2003 SP3)

    Thanks JudyJones! When I go to the On Open Event Wizard, there are three choices: Expression Builder, Macro Builder, and Code Builder. There is no text field to enter the Me.FieldName.SetFocus code. I looked in the Code Builder and there is other text above and below the insertion point. Assuming Code Builder is where I should enter the text, is it supposed to follow or precede any specific command lines?

  4. #4
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Active cell in new record (2003 SP3)

    The wizard provides the beginning and end of the procedure and you have to type the code in between the two lines of text you see when you enter the code builder. That is where the wizard places your cursor.
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

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

    Re: Active cell in new record (2003 SP3)

    If you want to set focus to a specific control whenever you move to a different record, you need to put code in the On Current event of the form:
    - Open the form in design view.
    - Activate the Properties window.
    - Make sure that the caption of the Properties window says Form.
    - Activate the Event tab of the Properties window.
    - Click in the On Current box.
    - Select [Event Procedure] from the dropdown.
    - Click the ... button to the right of the dropdown arrow.
    - Press the Tab key, then type

    Me.FieldName.SetFocus

    - As Judy wrote, you must replace FieldName with the name of the text box that should receive the focus.
    - Switch back to Access.
    - Save and close the form, then open it in form view.

  6. #6
    2 Star Lounger
    Join Date
    Jan 2008
    Location
    Wheaton, Illinois, USA
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Active cell in new record (2003 SP3)

    Getting an error message about needing to specify a macro group.
    If this is a network-permissions-exclusive rights problem, I won't pursue it at this time.
    If it's not, I'd appreciate more help.

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

    Re: Active cell in new record (2003 SP3)

    If you follow the instructions from my previous reply carefully, you shouldn't get that error message.

    If you wish, you can post a stripped down copy of your database. See <post#=401925>post 401925</post#> for instructions.

  8. #8
    2 Star Lounger
    Join Date
    Jan 2008
    Location
    Wheaton, Illinois, USA
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Active cell in new record (2003 SP3)

    Still not working, Hans. It's doing as previous--whatever cell was active previously, before I hit Page Down for the next record, that is where the cursor is on the new blank record. But I don't get any error messages now.

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

    Re: Active cell in new record (2003 SP3)

    I'll need to see a copy of your database. See my previous reply.

  10. #10
    2 Star Lounger
    Join Date
    Jan 2008
    Location
    Wheaton, Illinois, USA
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Active cell in new record (2003 SP3)

    It's a private institution, I'm not willing to do that. Thanks for the help so far.

Posting Permissions

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