View Single Post
  #6 (permalink)  
Old April 25th, 2008, 07:48 AM
mmcdonal mmcdonal is offline
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Sorry, I just went and checked deleting the recordsource on the On Close event, and that actually fires BEFORE the report is closed, and it won't delete a recordsource while it is being used. As a worst case, create the sTableName variable like this:

Public pTableName As String

pTableName = Me.RecordSource

Then you can pass the name to the next form, or a hidden intermediate form, and have the form open hidden, delete the table, and then close.

I am sure there must be a better way of doing this.


mmcdonal

Look it up at: http://wrox.books24x7.com
Reply With Quote