Results 1 to 7 of 7
  1. #1
    xopherira is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Location
    Indiana
    Posts
    53

    get and remove records form recordset

    I am trying to update a record set. I need to be able to grab first three records from array and process with update query then get rid of and process next three until end of array. Have tried multiple for loop variation with no success. Below is a print of array.
    Code:
    15 records retrieved.
      Material- S30007, Serial Number- DAJ0484, Parent SN EFDAH3224
      Material- S30000, Serial Number- DAJ2379, Parent SN EFDAH3224
      Material- S30146, Serial Number- DAJ3535, Parent SN EFDAH3224
      Material- S30007, Serial Number- DAJ0491, Parent SN EFDAH3225
      Material- S30000, Serial Number- DAJ2377, Parent SN EFDAH3225
      Material- S30146, Serial Number- DAJ3539, Parent SN EFDAH3225
      Material- S30007, Serial Number- DAJ0477, Parent SN EFDAH3226
      Material- S30000, Serial Number- DAJ2396, Parent SN EFDAH3226
      Material- S30146, Serial Number- DAJ3532, Parent SN EFDAH3226
      Material- S30007, Serial Number- DAJ0480, Parent SN EFDAH3227
      Material- S30000, Serial Number- DAJ2400, Parent SN EFDAH3227
      Material- S30146, Serial Number- DAJ3541, Parent SN EFDAH3227
      Material- S30007, Serial Number- DAJ0482, Parent SN EFDAH3228
      Material- S30000, Serial Number- DAJ2397, Parent SN EFDAH3228
      Material- S30146, Serial Number- DAJ3537, Parent SN EFDAH3228


  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Why 3 at a time? You need to somehow aggregate 3 records into 1? Why using code and not query?

    Describe what you are really trying to accomplish. Post your attempted code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    xopherira is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Location
    Indiana
    Posts
    53
    Is it possible to delete records from recordset while processing it. Yes need to aggregate, and using code due to nature of tool and limitations.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    No, don't delete from recordset. Skip them or don't retrieve to begin with - apply filter. What 'nature of tool' and 'limitations'? Still don't understand what you want to accomplish.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Seems SN is related in hierarchy

    Parent SN--->Serial Number
    and adding 3 common materials to each Serial Number

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    So why not an aggregate (Totals) Group By query? What aggregation do you want - Sum, Avg, Count?

    Why not a report using Sorting & Grouping features with aggregate calcs in group footer section?

    Or do you want something like http://allenbrowne.com/func-concat.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    It might be clearer if poster explained this in plain English

    grab first three records from array and process with update query then get rid
    of and process next three until end of array.

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

Similar Threads

  1. Replies: 3
    Last Post: 01-31-2014, 09:13 AM
  2. Replies: 2
    Last Post: 04-16-2012, 07:49 PM
  3. Replies: 2
    Last Post: 03-08-2012, 12:59 PM
  4. Replies: 2
    Last Post: 07-10-2011, 07:22 PM
  5. remove records from table
    By bird66 in forum Queries
    Replies: 1
    Last Post: 06-02-2011, 09:34 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