Releasing DataReport Connection

If I Preview a datareport on screen then select to either print or export it and cancel out of the print/export dialog box everything is ok

however, if I use a button to show the print/export dialog box (without first previewing) and then cancel out of the dialog box my application does not appear to disconnect the connection to the database even though I am doing this at Form_Unload.

The entire application even still remains in memory after the application is closed.

Anybody know what gives?
mutrusAsked:
Who is Participating?
 
yongyihConnect With a Mentor Commented:
try to set it to nothing..
e.g.

set dbConnection = nothing

Hope this can help you.  Good Luck. ^_^
0
 
mutrusAuthor Commented:
That was already being done in Form_Unload (form that called report) and also directly after the command that called the report

I also notice that a similar thing occurs when selecting print from a print preview and the printer errors (my example had the printer turned off). maybe I should be error trapping in the report?
0
 
mutrusAuthor Commented:
Well no other answers so points are yours
0
 
mutrusAuthor Commented:
Well no other answers so points are yours
0
All Courses

From novice to tech pro — start learning today.