Use the on close event of the report.
Private Sub Report_Close()
    'do whatever you want to do
End Sub