>In VB, I am using tables from Access. Before I exit the run time form, I want to make sure if all the tables are closed.
>
>I am using the following syntax:
>
> Public Sub closedatabases()
> frmMainFile.Rec_01.Recordset.Close
> End Sub
>
>Before closing the table, how can I make sure if the tables are
>open or not?
>Thank you!
Closing a recordset already closed (or not open) will generate an error.
Just put a ON ERROR RESUME NEXT.