Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Releasing DataReport Connection

Posted on 2002-07-29
4
Medium Priority
?
166 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 2

Accepted Solution

by:
yongyih earned 200 total points
ID: 7187142
try to set it to nothing..
e.g.

set dbConnection = nothing

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

Author Comment

by:mutrus
ID: 7187336
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
ID: 7744293
Well no other answers so points are yours
0
 

Author Comment

by:mutrus
ID: 7744305
Well no other answers so points are yours
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

596 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