Force Report to Close

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
Am I correct in assuming that

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

is not what you're looking for?

Randall Arnold
 
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.
 
Back
Top