Focus

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • A. Stern

    #1

    Focus



    I have created a form in Access 2003 which I use to add, delete, change,
    etc. records in a table. The form consists of a few textboxes (first name,
    last name, etc. ). In addition, I have placed some buttons on the form (add
    record, delete, etc. ) When I click the add record button, I would like for
    the focus to be in a particular textbox (first name); howver, for the life
    of me, I cannot figure out how to code for this to happen. I took an access
    class a few years back and looked throughout my book, but I don't remember
    the course covering details such as the GotFocus event. Please help.


    Thanks so much,

    Alex


  • Tom van Stiphout

    #2
    Re: Focus

    On Wed, 27 Dec 2006 22:30:48 -0500, "A. Stern" <ast332@yahoo.c om>
    wrote:

    Bring the form in design view. Select the button. Select properties,
    and select the Click event. It will say "event procedure", and click
    the ... button to the right. The code window will open.
    Towards the bottom of the code, write:
    <somecontrol>.S etFocus
    (where <somecontroli s the name of the control you want to set focus
    to)

    -Tom.

    >
    >
    >I have created a form in Access 2003 which I use to add, delete, change,
    >etc. records in a table. The form consists of a few textboxes (first name,
    >last name, etc. ). In addition, I have placed some buttons on the form (add
    >record, delete, etc. ) When I click the add record button, I would like for
    >the focus to be in a particular textbox (first name); howver, for the life
    >of me, I cannot figure out how to code for this to happen. I took an access
    >class a few years back and looked throughout my book, but I don't remember
    >the course covering details such as the GotFocus event. Please help.
    >
    >
    >Thanks so much,
    >
    >Alex
    >

    Comment

    Working...