Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 883
  • Last Modified:

How to I change the Default View property in runtime with VBA code in Access 2010

I am looking for a code snippet that I can use to change the default view of a form in Ms Access 2010. Something along the lines of frmMain.DefaultView = Single Form that I could put in the click event of a button and upon clicking the button the view of the form changes.
0
pundip44
Asked:
pundip44
1 Solution
 
MacroShadowCommented:
DoCmd.RunCommand(acCmdDatasheetView) to switch to Datasheet view

DoCmd.Runcommand(acCmdFormView) to switch to Form View
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now