Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insertion Point

Status
Not open for further replies.

rrobinsonmis

Instructor
Joined
Mar 17, 2004
Messages
3
Location
US
I am using a Access 2002 database. I have an Add button that the user clicks to add a record to the database. My problem is that after clicking on add the Insertion Point does not appear in the first field of the form so that she can begin to type information for the next record. If she hits tab she has to tab through 3 other buttons that are listed next to the add button and eventually she gets back to the first field. Is there a setting that can be set so that after she clicks the Add button to add the record the Insertion Point appears (goes)in the first field?

Thanks.

Regina.
 
Assume your button is called cmdAdd.
Assume the first field is called txtCompany.

In the OnClick event for cmdAdd, include this code....
Code:
me.txtCompany.SetFocus

Randy
 
After a record has been entered, you want to set the focus to the first field or any field. In the code of the On Click of the add button add the following (this would be done in the design view):

DoCmd.GoToControl"TextBoxName"

This is one method of accompolishing what you are trying to do.


HTH

An investment in knowledge always pays the best dividends.
by Benjamin Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top