Problem with form opening from onclick

Posted on 2006-06-08
Last Modified: 2008-02-01
I have a form that has a button and when I click on it the form opens but it's in form view.  I need it in datasheet view.

I've set the default to data sheet and even changed the settings for form view isn't available.  Any ideas why this thing keeps opening in form view?  Below is a way that another guy explained it...

"Won't open form in Data Sheet View - Access does not seem to allow you to open a form in Data Sheet View from within another form (in Form View) via a button - even though Data Sheet view is specified as Default in the properties of the form itself.  I have even tried to remove the "Form View" from the properties ("Allow Form View - "NO"") window - this has no effect when opening form from within another form.  Even from a switchboard it opens the form in "FORM" view not data sheet view.  You can switch the view on the form to Data Sheet once open but it will not open in Data Sheet view as a default"

So, the bottom line is why in the world won't the form open in datasheet view when we open it with a button.  When we open it from the access "console" (in the forms part) it opens in datasheet view every time.

Question by:ajslentz
    LVL 65

    Expert Comment

    u can specify the open in datasheet view when u open the form using


    LVL 65

    Accepted Solution

    I think its Docmd.openform "form", acformds


    Expert Comment

    I just had the same issue a found another solution.
    1. Right-click the button that opens the form and select "Build Event".
    2. On the Action "OpenForm" and under the Action Arguments change the View from "Form" to "Datasheet"

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

    729 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

    17 Experts available now in Live!

    Get 1:1 Help Now