Delete Table which is the RecordSource in a Report

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
 
J

Jeff Boyce

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
 
J

Jeff Boyce

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
 
S

Sarah

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?
 
J

Jeff Boyce

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
 

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