OnClose event in Reports
In the OnClose event of the report i have the command to open the form:
DoCmd.OpenForm "frmMain", acNormal, "", "", , acNormal
However, when i give the command from a control on a form, like that:
DoCmd.Close acForm, Me.Name
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
I cannot see the preview of the report, and only the form frmMain.Yet, when i close the form manually, then the report preview appears.
Obviously it is open but i cannot see it because of the form.Why my command to close the form does not work?
How can i see the preview report, and at the same time preserve the OnClose event of the report?I think my error lies with the form and not with the report?