[AccessD] Problems closing XP

Paula Wright paulawright at boddienoell.com
Tue Nov 18 07:45:34 CST 2003


Believe me, I've tried that and every other method I can think of to close it
and I'm still not having any luck.
 
Set CrystalReport3 = nothing gives me an Invalid Use of Property message.
 
Other variations:
CrystalReport3.exit - Object doesn't support this object or method
CrystalReport3.Object.Exit - Object doesn't support this object or method
CrystalReport3.Connection.Close - Object doesn't support this object or
method
CrystalReport3.Connection.Exit- Object doesn't support this object or method

CrystalReport3.Object.Close - Object doesn't support this object or method

I wish I could find documentation that addresses this situation.  That's what
I'm saying - I've looked EVERYWHERE I can think of and I cannot find any
answers.  I know that someone, somewhere has had to call Crystal Reports from
Access before so there is a solution, I just need to make contact with the
right person.


	-----Original Message----- 
	From: accessd-bounces at databaseadvisors.com on behalf of Stuart
Sanders 
	Sent: Tue 11/18/2003 7:43 AM 
	To: 'Access Developers discussion and problem solving' 
	Cc: 
	Subject: RE: [AccessD] Problems closing XP
	
	

	I don't use crystal reports, but I'll take a stab and suggest that
you may need
	to terminate the instance of crystal reports.
	
	If its embedded, I'm not really sure what you'd need to do, but for
called
	objects you usually need to do something the following when you close
the form:
	Set object = nothing
	
	So try
	Set CrystalReport3 = nothing
	In your form close event, and if that fails you may need to lookup
your
	documentation on how to close it.
	
	Stuart
	
	> -----Original Message-----
	> From: accessd-bounces at databaseadvisors.com
	> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
	> Paula Wright
	> Sent: Tuesday, 18 November, 2003 8:28 PM
	> To: accessd at databaseadvisors.com
	> Subject: [AccessD] Problems closing XP
	>
	>
	> I have an Access XP database calling Crystal Reports 8.5.  I
	> am desparate -
	> I've looked everywhere I can think of and still no answers.
	>
	> I have a crystl32.ocx embedded in my subform.  The main form is a
	> switchboard.  The problem is that the database will not shut
	> down without
	> using CTRL-ALT-DEL after calling a Crystal Report.  I can
	> open any subform
	> (including the subform with the ocx) and close without
	> problems, but as soon
	> as I call the CR I have a problem shutting down.
	>
	> I call Crystal Reports from the subform.  Here is a sample code:
	>
	> Private Sub PNL_Recap_Click()
	> On Error GoTo Err_PNL_Recap_click
	> Set db = CurrentDb
	> Set rs = db.OpenRecordset("Page 1 Report")
	> If rs![Month1 Occupancy] > 0 And rs![Month1 ADR] > 0 Then
	> DoCmd.Hourglass True
	>     Select Case Me.SelectRpt
	>         Case 1
	>             CrystalReport3.ReportFileName = "c:\Hotel Management
	> System\page1.rpt"
	>         Case 2
	>             CrystalReport3.ReportFileName = "c:\Hotel
	> Management System\page1
	> $.rpt"
	>         Case 3
	>             CrystalReport3.ReportFileName = "c:\Hotel
	> Management System\page1
	> Totals.rpt"
	>         Case 4
	>             CrystalReport3.ReportFileName = "c:\Hotel Management
	> System\page1Y.rpt"
	>     End Select
	>
	>         CrystalReport3.Destination = 0
	>         CrystalReport3.WindowState = 2
	>         CrystalReport3.Action = 1
	>
	>         DoCmd.Hourglass False
	> Else
	>     MsgBox "You must fill out fields in ADR/Occupancy."
	> End If
	>
	> Set rs = Nothing
	>
	> Exit_PNL_Recap_click:
	>     Exit Sub
	> Err_PNL_Recap_click:
	>     MsgBox Err.Number & " " & Err.Description & " /PNL_Recap_Click"
	>     Resume Exit_PNL_Recap_click
	> End Sub
	>
	> At first I was able to take the focus off the subform before
	> shutting down
	> and that seemed to work, however that no longer works.  I've
	> been told that
	> it may not actually be the CR causing the problem but
	> something else.  The
	> problem is that it seems to work fine except when I open the
	> CR.  That seems
	> to indicate that something is left hanging, but I don't know
	> what and I don't
	> know how to close the CR programmatically.
	>
	> Thank you
	> Paula Wright
	>
	>
	> _______________________________________________
	> AccessD mailing list
	> AccessD at databaseadvisors.com
	> http://databaseadvisors.com/mailman/listinfo/accessd
	> Website: http://www.databaseadvisors.com
	>
	
	
	_______________________________________________
	AccessD mailing list
	AccessD at databaseadvisors.com
	http://databaseadvisors.com/mailman/listinfo/accessd
	Website: http://www.databaseadvisors.com
	
	



More information about the AccessD mailing list