On a form I have a command button that opens a report.
DoCmd.OpenRepor t stDocName, acPreview
In th Report_activate I have some code that sets values on the report. As I step through this code and get to the to End Sub and hit F8 it takes me back to the Report_Activate event again. At this point I continue to step through the code for the second time. When I get to End Sub the second time and hit F8 it then opens the report. I noticed it also does this on other forms and reports. When the forms or reports open all the info is correct.
My question: Why does it loop through the code more than once?
Thanks in advance for any help.
DoCmd.OpenRepor t stDocName, acPreview
In th Report_activate I have some code that sets values on the report. As I step through this code and get to the to End Sub and hit F8 it takes me back to the Report_Activate event again. At this point I continue to step through the code for the second time. When I get to End Sub the second time and hit F8 it then opens the report. I noticed it also does this on other forms and reports. When the forms or reports open all the info is correct.
My question: Why does it loop through the code more than once?
Thanks in advance for any help.
Comment