The following is the code that is being used to run the report.
Public Sub Do_Print()
On Error GoTo StopPrinting
Crystal1.Connect = "DSN=M:\Public\Accounting\New Commissions Application\Commissions.mdb"
Crystal1.ReportFileName = "M:\Public\Accounting\New Commissions Application\" & ReportName
Crystal1.ReplaceSelectionFormula (varSelectString)
Debug.Print varSelectString
If optPrint(0).Value = False Then
Crystal1.Destination = crptToWindow
Crystal1.Action = 0
Else
Crystal1.Destination = crptToPrinter
Crystal1.Action = 1
End If
Call ResetForm
Exit Sub
StopPrinting:
If Err.Number = "20545" Then
MsgBox "Printing Stopped by User", vbOKOnly + vbCritical, "Printer Stopped"
Else
MsgBox "Another error has occurred. Please Inform Alan" & Err.Number & " " & Err.Description
End If
Call ResetForm
End Sub
In a previous version of the application that I had written with an Access 97 database, and CR7.0. I did not need the connection string and the reports ran fine. I was wondering if there is anything different because of Access 2000 or CR8.5
Thanks.