MsgBox "Your System Resources are below 20% Free, the job cannot be started! Please exit CRPEDemo, close some of your other Windows applications and try again."
Exit Sub
End If
'Set mouse to an Hour glass
Screen.MousePointer = 11
Unload Me
'Print report to printer. If this fails then retrieve the error
'number and error string and display in a message box. If the call
'is successful then display the appropriate message in the status
'bar caption. Notice that the PrintReport property was used
'so that a Result% was return inorder to do proper error checking
If Main.Report1.PrintReport <> 0 Then
Screen.MousePointer = 0
MsgBox "Printing the Report to Window has caused Error#: " & Main.Report1.LastErrorNumber & " - " & Main.Report1.LastErrorString
Exit Sub
Else
Main!StatusBar.Caption = "Printing to printer Successful."