Solved

Releasing DataReport Connection

Posted on 2002-07-29
4
156 Views
Last Modified: 2010-05-01
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?
0
Comment
Question by:mutrus
  • 3
4 Comments
 
LVL 2

Accepted Solution

by:
yongyih earned 50 total points
Comment Utility
try to set it to nothing..
e.g.

set dbConnection = nothing

Hope this can help you.  Good Luck. ^_^
0
 

Author Comment

by:mutrus
Comment Utility
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
 

Author Comment

by:mutrus
Comment Utility
Well no other answers so points are yours
0
 

Author Comment

by:mutrus
Comment Utility
Well no other answers so points are yours
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now