Results 1 to 3 of 3
  1. #1
    mp3909 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    136

    EntireRow RecordSet

    Hi,



    Is it possible to debug.print the entirerow of a recordset? i.e. I want to say print out the 15th row?

    I managed to open up this table into a recordset in access VBA.

    I know how to access each field but don't know how to print out the entirerow of a recordset.

    Any help please?

    Thanks

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Review https://msdn.microsoft.com/en-us/lib.../ff193530.aspx

    The Fields collection of a Recordset object represents the Field objects in a row of data, or in a record. You use the Field objects in a Recordset object to read and to set values for the fields in the current record of the Recordset object.

    To refer to a Field object in a collection by its ordinal number or by its Name property setting, use any of the following syntax forms:

    Fields(0)

  3. #3
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    the link orange posted will give you the background of the fields collection
    and then to traverse it you can try something like this

    Code:
    For i = 0 To rs.Fields.Count - 1
    Debug.Print rs.Fields(i).Name & " = " & rs.Fields(i)
    Next i

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 01-22-2015, 09:57 AM
  2. Replies: 6
    Last Post: 12-03-2013, 11:14 PM
  3. How to Select second Recordset from first recordset
    By FrustratedAlso in forum Programming
    Replies: 28
    Last Post: 05-10-2012, 05:45 PM
  4. Replies: 2
    Last Post: 03-08-2012, 12:59 PM
  5. Replies: 1
    Last Post: 11-13-2009, 03:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums