Hi,


I have to close a table manually in vba. I am usign the following command

DoCmd.Close acTable, "Mailboxes", acSaveYes

Now this works fine, but sometimes it gives an error such that my whole Access Database hangs and I have to close it via the task manager and cannot debug. But I suspect the problem is possible if the mailboxes table is not open in the first place, and I run the above command. So I want to check if a table is open and if yes I want to run the above command. Does anyone know of such a command. I couldn't find it all over msdn

Something like


if Mailboxes table open then

DoCmd.Close acTable, "Mailboxes", acSaveYes

end if



Thanks