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

Open Form In Datasheet view?

Status
Not open for further replies.

Wrecker

Technical User
Aug 29, 2001
126
US
How would I tell access to open a form in datasheet view". I'm assumming I should put the code in the "form open" module, but I'm having trouble with the code.

Thanks
Wrecker
 
Create a macro where Action = "Open Form" and in the "Action Arguments" section View = "Datasheet". Fill in the necessary info in the other Action Arguments.

Attach the macro to the on open function.

Susanne
 
Wrecker, you don't need a macro or even VB code. Just set the default View property of the form to datasheet. Maq [americanflag]
<insert witty signature here>
 
If you open the form from the forms list it will open in Datasheet view. If you open the form using a command button it opens in form view.

Thanks
Wrecker
 
Wrecker, what's the code used to open the form on the button? You can specify which mode to use when opening the form with the docmd.openform statement.

DoCmd.OpenForm &quot;form name here&quot;,acFormDS Maq [americanflag]
<insert witty signature here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top