form control button does not open form as datasheet

  • Thread starter Thread starter CFreeh
  • Start date Start date
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?
 
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

Back
Top