By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,145 Members | 1,629 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,145 IT Pros & Developers. It's quick & easy.

Focus

P: n/a


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
Dec 28 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Wed, 27 Dec 2006 22:30:48 -0500, "A. Stern" <as****@yahoo.com>
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>.SetFocus
(where <somecontrolis 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
Dec 28 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.