Delete Table which is the RecordSource in a Report

  • Thread starter Thread starter Sarah
  • Start date Start date
S

Sarah

I have this function that creates a table (random name) and I pass the table
to the openargs in the openreport command (acprintpreview). I set my
recordscource in the report to this table, but when I close out of the report
I want the table to be deleted. So I've tried to delete the table on the On
Unload, On Deactivate and OnClose events and neither one will delete the
table. The error states that it is already in use. Any suggestions?

Thank you.
Sarah
 
Sarah

That sure seems like a lot of work to get a report.

Have you looked into using a query as the source of your report? That way,
it does "exist" until needed and doesn't "persist" after use...

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Sarah

About what?

As before, until you give us more information, we're somewhat limited to
offering generic suggestions...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Your previous suggestion does not work for me. Like I said in my first
e-mail how can I delete a table that I use in the recordresource of my report
after the user closes the report?
 
Like I said in my first response, that's a lot of work (and you probably
don't need to).

If you're convinced that the approach you settled on is the only way you'll
be able to accomplish what you need to, hopefully someone else has done
something like this and can offer advice. I don't have any experience doing
that.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top