title: Looping a process for multiple rows
body: <p>I am new to VBA and have ran into what I believe should be a simple fix.  Below is code that I am using to create temp tables.  The code is functional and working as intended, however, I would like to add another level. I want to build a loop that repeats this process for multiple rows in the RsP! recordset.  So if I have 3 rows in the rsP tables I would like to create these record 3 separate times. Any help on how to do this would be appreciated, I have hit a brick wall even though I am sure the answer is right in front of me.  Thank You!</p>
  
  <pre><code>    Do Until (x = colCount)
  
  
      With rsNewRedacted
  
          .AddNew
  
              !A0 = rsP![Redacted ID]
  
              If (Right(rsP![Redacted / Redacted Name], 1) = "-") Then
                  !A1 = Left(rsP![Redacted / Redacted Name], Len(rsP![Redacted / Redacted Name]) - 1) 
              Else
                  !A1 = rsP![Redacted / Redacted Name]                                                
              End If
  
              rsI.AbsolutePosition = c.Item("01.06")
              !A5 = removeSpecialInclSpace(rsI("Col" &amp; x))
  
              !A6 = Left(rsP![Redacted ID], 2)                                                     
              !A9 = rsP![MCC]                                                                     
  
              rsI.AbsolutePosition = c.Item("05.02")
              p0502 = rsI("Col" &amp; x)
              !A10 = removeSpecial(rsI("Col" &amp; x))                                                
  
              !A14 = rsDefRedacted![A14]                                                           
              !A16 = rsDefRedacted![A16]                                                           
              !A23 = rsDefRedacted![A23]                                                           
  
              rsI.AbsolutePosition = c.Item("02.12")                                              
              p0212 = removeSpecial(rsI("Col" &amp; x))
              !A27 = p0212
  
              '!A27 = rsDefRedacted![A27]                                                           
  
              !A30 = rsDefRedacted![A30]                                                           
  
              rsI.AbsolutePosition = c.Item("01.16")
              !A53 = rsI("Col" &amp; x)                                                               
  
              rsI.AbsolutePosition = c.Item("02.09")                                              
              !A56 = rsI("Col" &amp; x)
              !A80 = rsI("Col" &amp; x)
  
              rsI.AbsolutePosition = c.Item("02.10")                                              
              !A57 = rsI("Col" &amp; x)
              !A81 = rsI("Col" &amp; x)
  
              rsI.AbsolutePosition = c.Item("02.11")
              !A58 = rsI("Col" &amp; x)                                                               
              !A82 = rsI("Col" &amp; x)                                                               
  
              rsI.AbsolutePosition = c.Item("02.14")
              !A59 = rsI("Col" &amp; x)                                                               
  
              rsI.AbsolutePosition = c.Item("01.19")
              ee = rsI("Col" &amp; x)                                                                 
  
              If (Left(ee, 1) = "Y") Then
                  !A71 = "Y"
              Else
                  !A71 = "N"
              End If
  
              rsI.AbsolutePosition = c.Item("02.13")
              !A75 = rsI("Col" &amp; x)                                                               
  
  
              rsI.AbsolutePosition = c.Item("07.13")
              p0713 = rsI("Col" &amp; x)
  
              If (Left(p0713, 3) &lt;&gt; "n/a") And (p0713 &lt;&gt; "none") And (p0713 &lt;&gt; "no") Then         
                  !A87 = p0713
              End If
  
              rsI.AbsolutePosition = c.Item("09.21")
              p0921 = rsI("Col" &amp; x)
  
              If (Left(p0921, 1) = "y") Then                                                      
                  !A99 = "Y"
              End If
  
              rsI.AbsolutePosition = c.Item("03.19")                                              
              p0319 = rsI("Col" &amp; x)
              !A119 = p0319
  
              rsI.AbsolutePosition = c.Item("03.19")
              !A119 = removeSpecial(rsI("Col" &amp; x))                                                         
  
              rsI.AbsolutePosition = c.Item("01.16")
  
              If (p0116 = "AUTO") Then
                  rsI.AbsolutePosition = c.Item("02.25")
                  p0225 = rsI("Col" &amp; x)
                  'A138 = removeSpecialInclSpace(p0225)
                  A138 = p0225
              End If
  
          .Update
  
      End With
  </code></pre>