Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

? on ActiveX Control for CR in Access

Status
Not open for further replies.

lynnd

MIS
May 3, 2002
23
US
Hello,
I have created a Crystal Report (v8.5) that will be accessed by end users through Microsoft Access (2000). The end users need the means to: 1) preview, 2) print, and 3) save to a file. I've included the ActiveX control for Crystal (Crystl32.ocx) and included the code for them to do the functions mentioned above.

The problem is that I want them to be able to choose a printer when they print instead of the report always going to their default printer. I found the method for
Code:
 .PrinterSelect
in the Crystal developr.hlp file, but if they press "Cancel" in the choose printer dialog box, the report still prints to their default printer.

Does anyone know how I can capture the "Cancel" event in this instance? I thought some sort of if/then statement like the following might work:
Code:
With CrystalReport1
     If .PrinterSelect <> &quot;Cancel&quot; Then
          .PrintReport
     End If
End With
but everything I've tried so far is to no avail.
Please help... Thanks!
Lynn
 
not sure how that works but in a normal commondialog you test if cancel was pressed by setting the &quot;.CancelError&quot; property to true then when they hit cancel an error is raised and you handle it via normal error handlers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top