title: Displaying RecordSet in textbox on Form
body: <p>I have created a recordset code that is comparing business id's to grab each customer that's been at this business. I want to pass on this data onto a form through a ubounded textbox or whatver works best for Access. When I have it stored into the unbounded text box in the recordset by using this code in my recordset Forms!Form.Badge = StrBusinesses, it is not showing uniquely on my form per each record/business ID. It shows up the same for each business when I scroll through each record. </p>
  
  <p>How do I get the recordset to show on the form uniquely to each record ? </p>
  
  <pre><code>Public Sub OpenRecordset()
      Dim qdf As QueryDef
      Set qdf = CurrentDb.QueryDefs("QOff2")
      qdf.Parameters(0).Value = [Forms]![Form]![Text10]
  
      Dim db As Database
      Dim rs As Recordset
      Dim StrBusinesses As String
  
      Set rs = qdf.OpenRecordset
  
      If rs.EOF And rs.BOF Then
          MsgBox ("No businesses exist for this Customer")
          Exit Sub
      Else
          rs.MoveFirst
      End If
  
      StrBusinesses = ""
      Do While Not rs.EOF
          StrBusinesses = StrBusinesses &amp; rs!Fnam &amp; ", "
          rs.MoveNext
      Loop
  
      rs.Close
  
      StrBusinesses = Left(StrBusinesses, Len(StrBusinesses) - 2)
      Forms!Form.Badge = StrBusinesses
  
      Set rs = Nothing
  End Sub
  </code></pre>
  
  <p>My query sql code:</p>
  
  <pre><code>SELECT badgeno, FNAM, filenum
  FROM ((INC LEFT JOIN AIO ON INC.NUM = aio.NUM) LEFT JOIN off ON aio.FNUM = off.FNUM) LEFT JOIN all ON aio.AIO_NUM = all.ALGNUM
  WHERE (((FILENUM)=[forms]![form].[text10]));
  </code></pre>
  
  <p>I am displaying it on a form by creating an unbounded textbox on my form and named it badge (Forms!Form.Badge). While when I push the run/green play button it updates all my unbounded textboxes in each form, so when I see the next record it says the same thing on the previous record. Also, I want it to show automatically without pushing the green play button in the module. </p>