Form default view

G

Guest

Hello:
When I click on forms in the database window they open in datasheet view
which is the view that I want them to open in but when I click on a button
from another form to open the same forms they open in form view. Is there a
way to get them to open in datasheet view when I click a button in another
form. I have changed the properties but that does not work.
Thanks,
J
 
D

Duncan Bachen

Jade5 said:
Hello:
When I click on forms in the database window they open in datasheet view
which is the view that I want them to open in but when I click on a button
from another form to open the same forms they open in form view. Is there a
way to get them to open in datasheet view when I click a button in another
form. I have changed the properties but that does not work.
Thanks,
J

Sure, you need to edit the code underneath the command button which
opens the form and tell it to open in Datasheet mode. Look up the help
for the OpenForm method of DoCmd.

For example, change:
DoCmd.OpenForm "frmYourForm"
to
DoCmd.OpenForm "frmYourForm", acFormDS
 
G

Guest

Thank you.

Duncan Bachen said:
Sure, you need to edit the code underneath the command button which
opens the form and tell it to open in Datasheet mode. Look up the help
for the OpenForm method of DoCmd.

For example, change:
DoCmd.OpenForm "frmYourForm"
to
DoCmd.OpenForm "frmYourForm", 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

Similar Threads


Top