Display an ADO recordset as a datasheet in MS Access data project

Posted on 2006-03-28
Last Modified: 2008-02-01
I am using Access 2002 as an adp front end to SQL Server 2000.  I want to create a recordset in ADO using parameters selected by the user and display it in a datasheet view, the same display result you get from DoCmd.OpenQuery and DoCmd.OpenStoredProcedure.
Question by:dwoliver
    LVL 44

    Accepted Solution

    I'm afraid that's not going to happen.
    You could have a form (in datasheet mode) with the appropriately bound controls in it - and then set that form's recordset to be the recordset you've opened.
    But a spontaneous datasheet from a recordset held in code isn't possible.
    (You could write it out in a structured order to a file or something - but that isnt the same as a datasheet type grid)

    Author Comment

    Thanks for clarifying this issue.  A related follow-up question.  Is it possible to open a stored procedure as a datasheet AND pass it some parameters or can you only open sprocs that require no parameters?
    LVL 44

    Expert Comment

    by:Leigh Purvis
    Well, bear in mind that it's something I'd never want to do anyway... I certainly don't know of a way that you'd do that (without the parameter prompts popping up at you).

    You should really be looking to use forms for such things.
    You gain so much more control.

    Author Comment

    Thanks, LPurvis for your prompt responses.  Answer accepted.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    In the previous article, Using a Critera Form to Filter Records (, the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
    I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
    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…
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

    754 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

    19 Experts available now in Live!

    Get 1:1 Help Now