Results 1 to 4 of 4
  1. #1
    Autumn
    Guest

    Browsing records in ADO (Access 2K) (Access 2K (SR 1))

    I am converting some of codes in DAO to ADO.
    In DAO I use the following codes to browse the records in datasheet view restricted by a query:

    Dim db As DAO.Database
    Dim qdf As DAO.QueryDef
    Dim strSQL As String

    Set db = CurrentDb
    Set qdf = db.QueryDefs("QueryName")
    strSQL = SQL commands ...
    qdf.SQL = strSQL
    DoCmd.OpenQuery qdf.Name

    I am unable to do so with ADO. Datasheet view apparently is non-existent programmatically in ADO. Can anyone help?

    [ Office 2000 SR-1 on Windows 98]

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Browsing records in ADO (Access 2K) (Access 2K (SR 1))

    What did you try in ADO? Your DAO code is simply opening a query. ADO doesn't have querydef objects, it has Views and Stored Procedures. If you want to browse records using ADO, you do it with a recordset and a form.
    Charlotte

  3. #3
    Autumn
    Guest

    Re: Browsing records in ADO (Access 2K) (Access 2K (SR 1))

    Thanks Charlotte. My DAO codes results in datasheet display of the query which I can browse, and which I can't do in ADO. I find it not a simple task to display query results by associating the query with a from in ADO.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Browsing records in ADO (Access 2K) (Access 2K (SR 1))

    In Access 2000, forms bound to ADO recordsets are not updateable. It isn't hard to set up unbound forms to browse the records, but they would not be continuous forms or datasheets, of course. Another method of doing it in ADO if you don't want to edit the data is to present it as text to the user. The way you handle it depends entirely on what you're trying to achieve.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •