C
Craig
I want to check and see if a table exists before I start
manipulating the data in it with VBA code. I have the
following...
Function TableExists(ByVal vstrTableName As String) As
Boolean
Dim db As DAO.Database: Set db = DBEngine.Workspaces
(0).Databases(0)
Dim tdf As DAO.TableDef
db.TableDefs.Refresh
Set tdf = db.TableDefs(vstrTableName) <<Item not found in
collection
End Function
In the main code, I am passing the name of the table into
the function call. It kees telling me that item is not
found in collection. Any way to correct this?
Thanks...
Craig
manipulating the data in it with VBA code. I have the
following...
Function TableExists(ByVal vstrTableName As String) As
Boolean
Dim db As DAO.Database: Set db = DBEngine.Workspaces
(0).Databases(0)
Dim tdf As DAO.TableDef
db.TableDefs.Refresh
Set tdf = db.TableDefs(vstrTableName) <<Item not found in
collection
End Function
In the main code, I am passing the name of the table into
the function call. It kees telling me that item is not
found in collection. Any way to correct this?
Thanks...
Craig