Joe,
I tried Set db = Nothing, but it did not work (there is
still a link to the database).
db.close works but I need to know that the database is
open before I can close it.
>-----Original Message-----
>"John Clayton" <anonymous DeleteThis @discussions.microsoft.com>
wrote in message <news:03c701c3b466$9b175f90
$a401280a@phx.gbl>...
>
>> I use a lot of Set db = OpenDatabase..... and db.close
>> with DAO in my programme. I also have to Compact the
>> Database from time to time. On occasions I miss a
db.close
>> then obviously Compact will not work as the database is
>> still open.
>> How do I detect that the database is still open, once I
>> know this I can write:
>> If database still open then db.close and then use
Compact.
>
>I always explicitly Set objects = Nothing after I Close or
>Quit them or whatever, so if the reference Is Nothing,
it's
>dead, otherwise it's live. I'm not sure if this technique
>is anathema to anyone besides Steven A. Mitchell, though.
>
>--
>Joe Foster <mailto:jlfoster%40znet.com> "Regged" again?
<http://www.xenu.net/>
>WARNING: I cannot be held responsible for the
above They're coming to
>because my cats have apparently learned to
type. take me away, ha ha!
>
>
>.
><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Detect an Open Database