Solved

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

Posted on 2014-02-19
1
740 Views
Last Modified: 2014-07-08
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
Comment
Question by:pundip44
1 Comment
 
LVL 26

Accepted Solution

by:
MacroShadow earned 500 total points
ID: 39872640
DoCmd.RunCommand(acCmdDatasheetView) to switch to Datasheet view

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
My experience with Windows 10 over a one year period and suggestions for smooth operation
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now