I'm converting an Access database to SQL and can't get this Module to run. It won't go past the Loop and if I take out Loop I get an "End With with With" error.
Function ClearPrintBook()
'Make all Printing set to = False This first part works!
Dim rst As Recordset
Dim db As Database
Set db = CurrentDb
Set rst = db.OpenRecordset("Sheet1", dbOpenDynaset, dbSeeChanges)
With rst
Do While Not .EOF
.Edit
!Printed = False
.Update
.MoveNext
Loop
End With
rst.Close
Set rst = Nothing
db.Close
Set db = Nothing
End Function