Set rst = MyDB.OpenRecordset("TCheckNo", dbOpenDynaset)
If Not ![ChkPD] Then 'If Employee has not been paid
.Edit
'Fields to loop would be Dte1 and Dte2 since they are called via the module. I need between those dates.
I woulld use the BeginDate for my starting date and EndDate for the end date. These would be set via the calendar.
Or between Dte1 and Dte2 would be the same.
Example: Dte1 = 2/23/21 and Dte2 = 2/24/21 Or Between Forms!frmMainMenu!BeginDate and Forms!frmMainMenu!EndDate
Dim rst As DAO.Recordset
Set rst = MyDB.OpenRecordset("SELECT * FROM TCheckNO WHERE CheckDate Between #" & _
Format(Dte1, "yyyy-mm-dd") & "# And #" & Format(Dte2, "yyyy-mm-dd") & "#", dbOpenDynaset)
With rst
Do While Not .EOF
If Not ![ChkPD] Then 'If Employee has not been paid
.Edit
...
.Update
End If
.MoveNext
Loop
.Close
End With