I created a macro to print a report using a switchboard command button, the report prints followed by a print of the swtichboard screen. I can not seem to find a way to stop it. I recreated the macro, the switchboard and converted the macro to VBA to find the error but can not find it. Below is the script for the macro. Does anyone have a solution?
Option Compare Database
'------------------------------------------------------------
' Print_NHP_List_Print_NHP_List
'
'------------------------------------------------------------
Function Print_NHP_List_Print_NHP_List()
On Error GoTo Print_NHP_List_Print_NHP_List_Err
DoCmd.OpenReport "NHP Report", acViewNormal, "", "", acHidden
DoCmd.PrintOut acSelection, , acHigh, 1, True
DoCmd.Close acMacro, "Print NHP List"
Print_NHP_List_Print_NHP_List_Exit:
Exit Function
Print_NHP_List_Print_NHP_List_Err:
MsgBox Error$
Resume Print_NHP_List_Print_NHP_List_Exit
End Function