Results 1 to 5 of 5

Thread: Add Record Form

  1. #1
    Join Date
    Nov 2002
    Location
    Marlow, Oklahoma
    Posts
    2

    Red face Unanswered: Add Record Form

    I'm new to this so the answer is probably simple. I've created a database and on one of the forms is a button to add a record. When
    I click on the button it takes me to a blank record to add, but I have to place the cursor in the first field manually each time. How do I get the
    application to automatically open to the first field?

  2. #2
    Join Date
    Mar 2002
    Posts
    192
    In the "On Load" event make a call to that button. Say your button was called btnNew then i believe the line of code that will make the call is

    btnNew_Click()

    or...

    copy and paste the code in that "add new" button to the "on Load" event.

    The second solution is not the most efficient solution but will get the job done.

  3. #3
    Join Date
    Feb 2002
    Posts
    108
    Just add the following line in the button_click code:

    FirstField.setfocus

    "FirstField" being the name of the field you want to set the focus to.

  4. #4
    Join Date
    Mar 2002
    Posts
    192
    Whoops Kevin's right. Ignore that post.

  5. #5
    Join Date
    Nov 2002
    Location
    Marlow, Oklahoma
    Posts
    2

    Thanks

    Originally posted by jkevin
    Just add the following line in the button_click code:

    FirstField.setfocus

    "FirstField" being the name of the field you want to set the focus to.
    Thank you for your response. That is exactly what I needed.

Posting Permissions

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