I have code-that opens a report as long as there is data in the tbl. when the user closes the report-a boolean is set to false-so that way it'll signal for the code to continue-but I close the report-and the code is still waiting for the boolean to be changed-it never stops at the on-close of the report. here's the code:
and at the onclose of the report:
but it never gets set to false-I even tracked it-and doesn't stop in the on-close any ideas why?
Code:
rptatt = True
stDocName = "rptAttendanceRecord"
stLinkCriteria = "[barcode]=" & Barcode
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
While rptatt = True
DoEvents
Wend
and at the onclose of the report:
Code:
rptatt=false