title: MS Access Continuous Form Not Updating
body: <p>So I'm fairly new to Ms Access and VBA. I'm trying to create an attendance calendar template where </p>
  
  <ul>
  <li>I calculate an attendance code based on an employee's attendance</li>
  <li>present that code onto a continuous form, as the employee number is fairly large</li>
  </ul>
  
  <p>I have gotten all the necessary queries for all data required but I just can't seem to display it the way I want to</p>
  
  <p>I used a DAO recordset to pull the data and whatnot. I have searched the internet high and low but can't seem to find and answer, so here I am.</p>
  
  <p>Problem:</p>
  
  <ul>
  <li>second and succeeding records use the first record's ID number instead of their own. The Name textbox is already bound to a query.</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/TLeFJ.png" rel="nofollow noreferrer">https://i.stack.imgur.com/TLeFJ.png</a></p>
  
  <p>PS. I've used <a href="https://www.microsoftaccessexpert.com/Microsoft-Access-Calendar-Database.aspx" rel="nofollow noreferrer">this</a> template as basis for the VBA coding.</p>
  
  <pre><code>Public Sub Main()
  
  'On Error GoTo ErrorHandler
  
  Call InitVariables
  Call InitArray
  Call LoadArray
  Call PrintArray
  
  
  'ExitSub:
  '    Exit Sub
  'ErrorHandler:
  '    msgbox "There has been an error. Please reload the form"
  '    Resume ExitSub
  End Sub
  
  Private Sub InitVariables()
  'On Error GoTo ErrorHandler
  
  intMonth = Me.cboMonth
  intYear = Me.cboYear
  lngFirstDayOfMonth = CLng(DateSerial(intYear, intMonth, 1))
  intFirstWeekday = getFirstWeekday(lngFirstDayOfMonth)
  intDaysInMonth = getDaysInMonth(intMonth, intYear)
  
  'ExitSub:
  '    Exit Sub
  'ErrorHandler:
  '    msgbox "There has been an error. Please reload the form"
  '    Resume ExitSub
  End Sub
  
  
  Private Sub InitArray()
  Dim i As Integer
  
  ReDim myArray(0 To 30, 0 To 2)
  
  For i = 0 To 30
  
  
      myArray(i, 0) = lngFirstDayOfMonth - intFirstWeekday + 2 + i
      If Month(myArray(i, 0)) = intMonth Then
          myArray(i, 1) = True
          myArray(i, 2) = Day(myArray(i, 0))
      Else
          myArray(i, 1) = False
  
      End If
  Next i
  
  End Sub
  
  Private Sub LoadArray()
  
  Dim db As DAO.Database
  Dim rs As DAO.Recordset
  Dim rs1 As DAO.Recordset
  
  Dim rsFiltered As DAO.Recordset
  Dim strSQL, strSQLTraxID As String
  Dim i As Integer
  
  
  
      'If Not rs.BOF And Not rs.EOF Then
  
          For i = LBound(myArray) To UBound(myArray)
  
              If myArray(i, 1) Then
  
     strSQL = "SELECT EiSyS.Date, [CAM Database].[Trax ID],  [CAM Database].[Full Name], EiSyS.AttendanceCode " _
    &amp; "FROM EiSyS INNER JOIN [CAM Database] ON EiSyS.EmployeeID = [CAM Database].[Trax ID] where EiSyS.Date = CDate('" &amp; Format(myArray(i, 0), "mm/dd/yyyy") &amp; "') and " _
    &amp; "EiSyS.EmployeeID = " &amp; Me.[EmployeeID]
  
                  Set db = CurrentDb
                  Set rs = db.OpenRecordset(strSQL)
                  Set rsFiltered = rs.OpenRecordset
  
                  Do While (Not rsFiltered.EOF)
  
                      myArray(i, 2) = rs!AttendanceCode
  
                      Debug.Print Format(myArray(i, 0), "mm/dd/yyyy") &amp; " - " &amp; rs!AttendanceCode &amp; " - " &amp; Me.[EmployeeID]
  
                      rsFiltered.MoveNext
                  Loop
  
              End If
          Next i
  
      'End If
  
      rsFiltered.Close
  
      rs.Close
  
  Set rsFiltered = Nothing
  Set rs = Nothing
  Set rs1 = Nothing
  
  Set db = Nothing
  
  
  End Sub
  
  Private Sub PrintArray()
  'On Error GoTo ErrorHandler
  
  Dim strCtlName As String
  Dim i As Integer
  
  For i = LBound(myArray) To UBound(myArray)
      strCtlName = "text" &amp; CStr(i + 1)
      Controls(strCtlName).Tag = i
      Controls(strCtlName) = ""
      Controls(strCtlName) = myArray(i, 2)
  
  
  Next i
  
  
  'ExitSub:
  '    Exit Sub
  'ErrorHandler:
  '    msgbox "There has been an error. Please reload the form"
  '    Resume ExitSub
  
  End Sub
  </code></pre>