Force Report to Close

G

Guest

I have Form A which displays certain data to the users. From Form A the
users have the option to run various sub reports on the fly with user defined
parameters off of the displayed data. These sub report procedures run
designated queries and create temp tables as the source for pre-set reports
which display the results. The users also have the option after viewing
these reports to close and return to Form A and run the same sub reports with
different paremeters at which time the procedures delete the existing temp
tables before the new report is run.

My issue is that when the users view a sub report but fail to close the
object prior to running the same report from Form A the open report keeps the
temp table in question locked therefore giving an error when my procedure
attempts to delete the temp table prior to creating the new one.

Any suggestions on how to force Reports to close on LostFocus or any other
solution to this issue?

PLease help!

A.S.
 
G

Guest

Am I correct in assuming that

DoCmd.Close acReport, strReport 'replace strReport with report name

is not what you're looking for?

Randall Arnold
 
G

Guest

As simple as it looks I could make that work for me since it does not give an
error when the report is not open...thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top