Form in Datasheet view

  • Thread starter Thread starter Pete
  • Start date Start date
P

Pete

I have a button on a form that opens another form. Is
there a way for the form to automatically open in
Datasheet view when I click the button? Any advice would
be great. thanks, pete.
 
I have the default view set to Datasheet. The form opens
properly when i just open it. but when i try and use a
button in another form to open it, it opens in form view.
 
In the code behind that button in another form, you can use the View
argument :

DoCmd.OpenForm "MyForm", acFormDS

to control more explicitly how you want that form to open.
 
In the openform method of the DoCmd object the second argument is the View
argument. I believe that if you specify acFormDS as the view argument the
form will open in datasheet view.
 
That worked perfectly. thanks alot!
-----Original Message-----
In the openform method of the DoCmd object the second argument is the View
argument. I believe that if you specify acFormDS as the view argument the
form will open in datasheet view.




.
 
Back
Top