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

How do I Open form so it displays empty record 1

Status
Not open for further replies.

mspeppa19

IS-IT--Management
Sep 26, 2002
92
US
I'm trying to find a way so that when my form is opened it automatically opens up to a new record. I still want to be able to view previous records. I know there is the "Data Entry" option, but I still want to be able to view previous records. Thanks!
 
Hi!

If the DataEntry property is out of the question, try moving to a new record. Perhaps in the forms on load event:

[tt]docmd.gotorecord,,acnewrec[/tt]

Roy-Vidar
 
Ok, that worked. Also, I created a form called Vendor List. And I have a button on another form that is supposed ot open the vendor list. When I created the vendor list form I created it as a datasheet, but whenever I open it from the other form it displays as a regular form. How do I go about making it open as a datasheet?
 
Check the openform code (button click code).

For datasheet, it would look something like this:

[tt]docmd.openform "someform", acFormDS[/tt]

Check the different formviews of the openform method. Datasheet is acFormDS,

There are also properties of the form, where you can set the allowed views of the form (they differ a bit between xp and 2000, I think, but in xp you can set "allow form view", "allow datasheet view"...

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top