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!

Button to open an Access form in Datasheetview?

Status
Not open for further replies.

mimitan

Technical User
Dec 17, 2004
34
Hi,
I am currently learning Access DB. I created a form with a button when clicked it will open another form. My question is when it open the second form, it default it to Form view, how can I change it to default to Datasheetview?

Here is a few lines of the codes attached to the command button
Sub...
.
.
stDocName = "Form To process update of the Weekly Ad"
DoCmd.OpenForm stDocName, , , stLinkCriteria
.
.
End sub.
Thanks!
 
DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yes,
That was exactly what I was looking for. Thanks PH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top