• Active cell in new record (2003 SP3)

    • This topic has 9 replies, 3 voices, and was last updated 17 years ago.
    Author
    Topic
    #449771

    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?

    Viewing 1 reply thread
    Author
    Replies
    • #1103630

      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.

      • #1103633

        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?

        • #1103634

          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.

    • #1103662

      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.

      • #1103764

        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.

        • #1103767

          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 for instructions.

          • #1103773

            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.

            • #1103775

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

            • #1103778

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

    Viewing 1 reply thread
    Reply To: Active cell in new record (2003 SP3)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: