A
accessles via AccessMonster.com
I have several reports but only one has a problem after closing the report.
I have a macro which I use in all of my reports shortcut menu bar. I use the
shortcut menu bar to
either print or close the report. I set the GBL_REPORT in each report. I can
close all the reports and return to Access except for one which after the
report closes, Access hangs and I have to end the task in windows task
manager. Any thoughts?????
Les
The macro consists of the following:
Macro Name Action Arguments
Print Runcode mcrRightClickItems_Print_Report ()
Close Runcode mcrRightClickItems_Close ()
The VBA Code is as follows:
Option Compare Database
'------------------------------------------------------------
' mcrRightClickItems_Print_Report
'
'------------------------------------------------------------
Function mcrRightClickItems_Print_Report()
On Error GoTo mcrRightClickItems_Print_Report_Err
DoCmd.OpenReport GBL_REPORT, acViewNormal, "", "", acNormal
mcrRightClickItems_Print_Report_Exit:
Exit Function
mcrRightClickItems_Print_Report_Err:
MsgBox Error$
Resume mcrRightClickItems_Print_Report_Exit
End Function
'------------------------------------------------------------
' mcrRightClickItems_Close
'
'------------------------------------------------------------
Public Function mcrRightClickItems_Close()
On Error GoTo mcrRightClickItems_Close_Err
DoCmd.Close acReport, GBL_REPORT
If GBL_CLOSE = "Y" Then
DoCmd.OpenForm "frmScheduleReports", acNormal, , , , acWindowNormal
GBL_CLOSE = "N"
End If
mcrRightClickItems_Close_Exit:
Exit Function
mcrRightClickItems_Close_Err:
MsgBox Error$
Resume mcrRightClickItems_Close_Exit
End Function
I have a macro which I use in all of my reports shortcut menu bar. I use the
shortcut menu bar to
either print or close the report. I set the GBL_REPORT in each report. I can
close all the reports and return to Access except for one which after the
report closes, Access hangs and I have to end the task in windows task
manager. Any thoughts?????
Les
The macro consists of the following:
Macro Name Action Arguments
Print Runcode mcrRightClickItems_Print_Report ()
Close Runcode mcrRightClickItems_Close ()
The VBA Code is as follows:
Option Compare Database
'------------------------------------------------------------
' mcrRightClickItems_Print_Report
'
'------------------------------------------------------------
Function mcrRightClickItems_Print_Report()
On Error GoTo mcrRightClickItems_Print_Report_Err
DoCmd.OpenReport GBL_REPORT, acViewNormal, "", "", acNormal
mcrRightClickItems_Print_Report_Exit:
Exit Function
mcrRightClickItems_Print_Report_Err:
MsgBox Error$
Resume mcrRightClickItems_Print_Report_Exit
End Function
'------------------------------------------------------------
' mcrRightClickItems_Close
'
'------------------------------------------------------------
Public Function mcrRightClickItems_Close()
On Error GoTo mcrRightClickItems_Close_Err
DoCmd.Close acReport, GBL_REPORT
If GBL_CLOSE = "Y" Then
DoCmd.OpenForm "frmScheduleReports", acNormal, , , , acWindowNormal
GBL_CLOSE = "N"
End If
mcrRightClickItems_Close_Exit:
Exit Function
mcrRightClickItems_Close_Err:
MsgBox Error$
Resume mcrRightClickItems_Close_Exit
End Function