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

    Looping through columns 1 and 2 only of a recordset

    Is it possible to loop all the way down through a specific column of a recordset?

    For example, my recordset contains 3 columns but I only want columns 1 and 2.

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    How exactly are you looping through it, and what exacly are you trying to do?
    When looping through records, you can reference any columns that you like.

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    not sure what your issue is - recordsets have fields, not columns - and field have names, so just refer to the field name - or use the field index

    myrecordset!fieldnameX
    myrecordset.fields(0)

  4. #4
    mp3909 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    136
    thanks Ajax, working now.

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

Similar Threads

  1. Replies: 3
    Last Post: 08-08-2018, 08:13 AM
  2. Replies: 7
    Last Post: 08-26-2016, 07:45 AM
  3. Replies: 2
    Last Post: 10-31-2014, 07:42 AM
  4. looping through recordset (columnwise)
    By pradeep.sands in forum Queries
    Replies: 1
    Last Post: 06-27-2013, 09:46 AM
  5. Replies: 2
    Last Post: 06-13-2012, 06:00 PM

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