Data Sheet View

  • Thread starter Thread starter Cliff Waters
  • Start date Start date
C

Cliff Waters

Hi
Please can anyone help me?
I would like to put a button on a form to bring up the Datasheet view of the
form is this possible.

Thanks in advance for any help

Cliff
 
Although it is not easy to determine from Help in Access 2003, the
DefaultView property of the form, which indicates the view in which the form
will be opened, can be changed only in Design View.

To do what you want, you'd have to open the Form in Design View, execute
code to change Default View, and reopen in Form View. And, of course, under
these circumstances, it would remain in the last-selected view until you
changed the Default View again.

It seems to me it would be simpler to make a copy of the Form, set its
Default View to Datasheet, and use your Command Button to open that Form.

Larry Linson
Microsoft Access MVP
 
In the Click Event of the CommandButton, use the code:

DoCmd.RunCommand acCmdDatasheetView
 
Back
Top