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

Opening Forms to a new record

Status
Not open for further replies.

vlew

Technical User
Jul 12, 2002
3
US
I am trying to set up a short cut to the desktop so that when accessed a specific form opens up to a new record. Currently it always opens to the first record.
 
I think there's two ways you could do this. First you could set the data property of the form to allow data entry. Or, if you are using a button to open the new form try adding the acFormAdd to the code. For example,
DoCmd.OpenForm stDocName, acNormal, , , acFormAdd
This is the way I would recommend. Hope it works for you.
 
Hi!

Another way would be in the Load event procedure use the following code:

DoCmd.RunCommand acCmdRecordsGoToNew

This will open the form to a new record and still allow the user to view existing records.

This can also be done in a macro using the RunCommand Action.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top