Command button Open form

  • Thread starter Thread starter hermie
  • Start date Start date
H

hermie

I have created a command button in an unbound form to open a form. However
the data is showed in form view while the form default is datasheet view.
What do I need to do to see the form in datasheet view from the command
button?

PS When I open the form without the commandbutton it show the data in
datasheet view with the commandbutton I see the data in formview format

Herman
 
Hi Herman,

If you do not specify a View argument in the OpenForm method, then acNormal is assumed (which is
normal form view). You need to add the acFormDS argument. Adjust your OpenForm code to something
like this:

DoCmd.OpenForm "Name Of Your Form Here", acFormDS
 
Back
Top