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
 
Top