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
 
Back
Top