Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Location
    Europe
    Posts
    369

    Question Unanswered: Returning DAO rs field names in the immediate window?

    I have found the rs.fields command that returns the number of fields.
    How can I return the DAO rs field names in the immediate window?

    Daniel
    Win-XP pro, Access 2002, ADO 2.7, DAO 3.6. English versions of apps/OS.

  2. #2
    Join Date
    Apr 2003
    Location
    Alabama, USA
    Posts
    154
    Code:
    Dim myDB As DAO.Database
    Dim myRST As DAO.Recordset
     
    Set myDB = CurrentDb()
    Set myRST = myDB.OpenRecordset("Table1")
     
    'First field
    Debug.Print myRST.Fields(0).Name
     
    'Second field
    Debug.Print myRST.Fields(1).Name
     
    myRST.Close
    myDB.Close
    Is that what you are wanting to do?
    http://AccessDB.Info

    You live and learn. At any rate, you live. - Douglas Adams

Posting Permissions

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