form control button does not open form as datasheet

C

CFreeh

I have a form that the default "On Open" is datasheet view. When I create a
Control Button to open the form it opens in form view. How can I keep the
default setting in order to open the form in datasheet view?
 
D

Douglas J. Steele

By default, the OpenForm method always opens the form in Form view. You need
to specify acFormDS as the second argument of the method:

DoCmd.OpenForm "MyForm", acFormDS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top