How to detect if a table exists?
How do you detect if a table exists. I have a table tblAvailability and I need to delete it and create it, and I am trying to avoid errors by knowing in advance if the table exists or not.
I have seen the following used...
Function fTableExists3(strTableName As String) As Boolean
On Error Resume Next
fTableExists3 = IsObject(CurrentDb.TableDefs(strTableName))
End Function
But not sure if this is the ticket.
Regards,
Marc Noon
Coding is a game. Live it, love it, break it, run it.
__________________
Marc Noon
Coding is a game. Live it, love it, break it, run it.
|