Form default view

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
 
Back
Top