How to change a form view

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
 
D

DavidG

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
 
D

DavidG

OOPS
Datasheet view should have been
Forms(0).AllowDatasheetView = True
DoCmd.OpenForm FormName:=Forms(0).Name, View:=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