Changing to datasheet view by code

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