Hi -
My goal is to present a user with two buttons - one that opens a report in print preview with the detail section visible and then one without it visible. I have built the On Click event for the two buttons and they open the report as required, toggling the visible true/false. However, once I close the report, I'm totally locked out of Access - meaning I can't click anywhere, even in the code window. I have to close down the Access application entirely. I assume that I'm not ending my code and am looking for some support on the proper syntax. Happy to provide any additional context and REALLY appreciate anyone's assistance here on what I hope is a straightforward issue.
Buttons
Button_PrintSummary
Button_PrintSummarywDetail
Code
Private Sub Button_PrintSummary_Click()
DoCmd.OpenReport "Rpt - SO by Customer", acViewPreview, "",, acViewPreview
Repots![Rpt - SO by Customer].Section(0).Visible = False
End Sub
> I chose AcDialog to set Modal and Popup to Yes automatically.
My goal is to present a user with two buttons - one that opens a report in print preview with the detail section visible and then one without it visible. I have built the On Click event for the two buttons and they open the report as required, toggling the visible true/false. However, once I close the report, I'm totally locked out of Access - meaning I can't click anywhere, even in the code window. I have to close down the Access application entirely. I assume that I'm not ending my code and am looking for some support on the proper syntax. Happy to provide any additional context and REALLY appreciate anyone's assistance here on what I hope is a straightforward issue.
Buttons
Button_PrintSummary
Button_PrintSummarywDetail
Code
Private Sub Button_PrintSummary_Click()
DoCmd.OpenReport "Rpt - SO by Customer", acViewPreview, "",, acViewPreview
Repots![Rpt - SO by Customer].Section(0).Visible = False
End Sub
> I chose AcDialog to set Modal and Popup to Yes automatically.