Changing to datasheet view by code

S

Snow

Hi all
I've got a bit of a funny one. I've got 2 forms and a button on one.
When pressed it opens the other form, But it opens it up in form view
and it needs to open it up in datasheet view. The prop's are set to
datasheet view by default in the form prop's and when i open it up by
it's self it does view it in datasheet format from startup.How do you
change the ' view type 'to datasheet view by code??
Thanks
Snow
 
F

fredg

Hi all
I've got a bit of a funny one. I've got 2 forms and a button on one.
When pressed it opens the other form, But it opens it up in form view
and it needs to open it up in datasheet view. The prop's are set to
datasheet view by default in the form prop's and when i open it up by
it's self it does view it in datasheet format from startup.How do you
change the ' view type 'to datasheet view by code??
Thanks
Snow

Regardless of a form's Default View setting, if you wish to open a
form in Datasheet view using code, you must explicitly state it:

DoCmd.OpenForm "FormName", 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

Top