Wez.k wrote:
>I have a report based on a temp table which I would like to delete when the
>report closes, using the On Close event. However, I get an error message
>because Access tries to delete the table before the report has closed, which
>I suppose is logical. What is the best way to achieve what I want to do?
The best thing to do is to avoid using a temp table at all.
The next best thing is to remove all the records in the
table before inserting new ones. However, this will still
cause your (front end?) database to bloat, though not as
much as deleting the whole table. Either way, the temp
table should be in a separate mdb file (see
http://www.granite.ab.ca/access/temptables.htm
for a good way to manage all that).
--
Marsh
MVP [MS Access]