Form in Datasheet view

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.
 
P

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.
 
C

Cheryl Fischer

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.
 
T

Tom Stoddard

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.
 
P

pete

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.




.
 

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