Hi Kevin,
>I need to find out where in my code a table is inadvertently
>being closed (or another table opened in its place).
If this is VFP 7 or higher and the table in question is part of a database, you should be able to trap this in the DBC_BeforeCloseTable event.
Additionally, you couldd perform a review of your code looking for USE statements. Missing the IN 0 clause is a likely reason for opening another table in the same work area as the one that is closed.
--
Christof
--
Christof