How to change a form view

  • Thread starter Thread starter Nuria Vélez
  • Start date Start date
N

Nuria Vélez

Hi, I need to change the view of a form which is already opened and I don´t
want do it with the toolbar.
Thanks in advanced
 
Hi, I need to change the view of a form which is already opened and I
don´t want do it with the toolbar.
Thanks in advanced


Check out "AllowDatasheetView" Property in VB help.

Command button for Datasheet view...
Forms(0).AllowFormView = True
DoCmd.OpenForm FormName:=Forms(0).Name, View:=acFormDS

For Form View
Forms(0).AllowFormView = True
DoCmd.OpenForm FormName:=Forms(0).Name, View:=acNormal

HTH
 
OOPS
Datasheet view should have been
Forms(0).AllowDatasheetView = True
DoCmd.OpenForm FormName:=Forms(0).Name, View:=acFormDS
 
Back
Top