Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8716407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:04:13+00:00 2026-06-13T06:04:13+00:00

I am using Access 2007 for a prototype application.I have a two database testUi.accdb

  • 0

I am using Access 2007 for a prototype application.I have a two database testUi.accdb (which

contain all of my forms) and testDb.mdb (which contain my database).
Now I want to use a datasheet in one of my subform.
Can anybody help me with these questions?

  1. Can I manually build a datasheet without table?
  2. How can i bind data with this datasheet using DAO or ADO by VBA Code
  3. Is it possible to loop a datasheet using VBA Code ? get or set value for each rows?
  4. If above are not possible then what are the alternate way
    to use datasheet like grid in Access?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:04:14+00:00Added an answer on June 13, 2026 at 6:04 am

    1) Datasheet forms can only be bound to DAO recordset objects or ADO Recordset objects. You can bind them to DAO recordset objects implicitly by setting the RecordSource or you can do it manually in code as shown in #2. You can only bind to an ADO recordset using code and then some of the Datasheet’s default options like filtering and sorting will not work.

    2) I know this is overly simplified but… On the form’s Load Event: Set Me.Recordset = rs (rs is your recordset object)

    3) You cannot loop through the datasheet inserting row objects and data like you can on many grid controls.

    4) You could use Microsoft’s ActiveX controls such as the Grid Control or ListView Control.

    One way you could possibly accomplish this is to use a “fabricated ADO recordset” and then bind the form to that recordset. This would be using the options I laid out in #1 and #2.

    In any case, an Access Datasheet form does not dynamically add and configure enough cells/columns to display data like many grid controls do. This means you’ll need to have enough textboxes on the form before hand, and then use code to bind them to the fields in your DAO or ADO recordset. Any columns you don’t need will have to be hidden using code. Label captions will have to be filled out using code so they make proper column headers. In short, while the datasheet view is actually very powerful, it simply isn’t a Grid Control.

    If you’ve ever used .NET it would probably be reasonably simple (although not trivial) to create an AddIn or a dll that would give you what you are looking for. The only problem is that .NET’s DataGridView cannot be bound to a DAO or ADO recordset so you’ll have to write code to take a DAO or ADO recordset and “translate” that recordset to an ADO.NET DataTable. Alternately you could write is so that your .NET form does data access by taking database and query information and using that to retrieve the desired data.

    Edit1
    In response to your comments below, here’s some example code. I think you need to create an explicit recordset object, which you’re not doing in the comment below.

    Option Compare Database
    Option Explicit
    
    Private Sub Form_Load()
        Dim db As DAO.Database
        Set db = OpenDatabase("E:\Access\Testdb.mdb")
        Dim rs As DAO.Recordset
        Set rs = db.OpenRecordset("Select * from tblMarket", dbOpenSnapshot)
        Set Me.Market1.Form.Recordset = rs
        Set rs = Nothing
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following problem in a Database using Access 2007 as front end
I have a front-end Access 2007 database connecting to MySql tables using MySQL ODBC
I have a database I'm working on designing using Access 2007 and I'm wondering
I am using Access 2007 and have some linked tables to a mySQL database.
Using MS Access 2007, I am creating a student management database. I have tables
I have the below query in access 2007 which gave me correct results using
I've posted a demo Access db at http://www.derekbeck.com/Database0.accdb . I'm using Access 2007. I
Background info : I was handed a Tool, which was made using MS-Access 2007,
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
I am using Access 2007 to create an SQL query to join two tables.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.