H
Harry-Wishes
I am trying to programmatically make a copy of each table I have created in
Access. However, I know there are built-in tables (hidden tables) that access
needs. If you run the test script below, you will see that those tables will
appear in the collection of tables (both built-in and the ones the user
actually created). I think you see my problem. I obviously want to make a
copy of the tables I created, not the ones that are built-in with Access. Is
there a way to restrict Access to copying user-defined tables? Perhaps there
is a count property that counts just user-defined tables in the AllTables
collection object. If so, I can't find it. I have listed the built-in
tables below. All I need is a way of filtering. I don't need the script for
copying. I know how to do that.
Thanks
HW
Private Sub cmdTables_Click()
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentData
' Check each object of the AllTables collection
For Each obj In dbs.AllTables
' When you find a table, display its name
MsgBox obj.Name
Next obj
End Sub
MSysAccessObjects
MSysAccessXML
MSysACEs
MSysObjects
MSysQueries
MSysRelationships
Access. However, I know there are built-in tables (hidden tables) that access
needs. If you run the test script below, you will see that those tables will
appear in the collection of tables (both built-in and the ones the user
actually created). I think you see my problem. I obviously want to make a
copy of the tables I created, not the ones that are built-in with Access. Is
there a way to restrict Access to copying user-defined tables? Perhaps there
is a count property that counts just user-defined tables in the AllTables
collection object. If so, I can't find it. I have listed the built-in
tables below. All I need is a way of filtering. I don't need the script for
copying. I know how to do that.
Thanks
HW
Private Sub cmdTables_Click()
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentData
' Check each object of the AllTables collection
For Each obj In dbs.AllTables
' When you find a table, display its name
MsgBox obj.Name
Next obj
End Sub
MSysAccessObjects
MSysAccessXML
MSysACEs
MSysObjects
MSysQueries
MSysRelationships