open form button

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!
 
J

Jack

When you are in design view on the form you are opening,
change the DefaultView property of that form to Datasheet.
 
K

Kevin

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
 
J

Jack

I am not sure what coding the Wizard shows but the
following should work for the OnClick event:

DoCmd.OpenForm "[yourFormName]", 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