i have a report that i have to print and then marked this report with yes\no field that the record has been printed but my db stack (infinity loop I guess)
my code
my code
Code:
Private Sub btn334_Click()
DoCmd.PrintOut PrintRange:=acPrintAll, PrintQuality:=acHigh, CollateCopies:=True
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset(Name:="myquery", Type:=RecordsetTypeEnum.dbOpenDynaset)
Do While Not rst.EOF
rst.FindFirst Criteria:=[printed] = "false"
With rst
.Edit
![printed] = "true"
.Update
End With
rst.MoveNext
Loop
End Sub