open form button

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

I set up a simple command button on one form to open a
different form (using the wizard). The form I am opening
is in datasheet view, but when I open it with the command
button it appears in single form view. How can I change
this so it opens in the default "datasheet" view?
Thank you!
 
When you are in design view on the form you are opening,
change the DefaultView property of that form to Datasheet.
 
I already have that set, and it opens in datasheet view
when you go in and open the form. But when you use the
button, it still shows in single form view. When open in
single form view, I can go to design view and the
DefaultView property says "datasheet". Doesn't make much
sense to me. Any further advice or other properties I
need to look st?
Thanks again!
Kevin
 
I am not sure what coding the Wizard shows but the
following should work for the OnClick event:

DoCmd.OpenForm "[yourFormName]", acFormDS
 
Back
Top