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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default form to empty record?

Status
Not open for further replies.

shauntck

Programmer
Jul 13, 2004
19
0
0
US
Hey guys, i'm not much of an access guru yet. Was wondering if anyone knows how to default a form to load a blank record ready for input but still allow you to search through the other ones if needed.

Thanks,
-Shaunt
 
If you are going from one form to another, ie, Switchboard, to Form A, put the following code in the ON Click event of the button that is to open Form A which appears on your switchboard.

1. DoCmd. OpenForm "FormName",acNormal
2. DoCmd. GoToRecord acDataForm, "FormName",acNewRec
3. DoCmd.GoToControl "TextBoxName"

#1 will take you to Form A and #2 will start a new record still leaving you the ability to Search. # 3 will set the focus of the cursor to the first text box you want.

These commands should also give you other ideas on what is possible.

Good Luck!


An investment in knowledge always pays the best dividends.
by Benjamin Franklin
Autonumber Description - FAQ702-5106
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top