Results 1 to 2 of 2

Thread: counting fields in DAO

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    u.s.a
    Posts
    127
    Is there a way to count the number of fields in a recordset?
    I am using VB6 with DAO.
    Thanks.
    Dan.

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Sure! A recordset contains a field collection method.
    Code:
    Dim iNumOfFields As Integer
    
    iNumOfFields = rs.Fields.Count
    This assumes you have named your recordset rs.
    Good luck!

Posting Permissions

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



Click Here to Expand Forum to Full Width