T
Tom Ellison
Please consider this VBA code:
Dim MyDatabase As Database, i As Integer
Set MyDatabase = OpenDatabase("D:\NWNKBE.mdb")
For i = 0 To MyDatabase.TableDefs.Count - 1
If Left(MyDatabase.TableDefs(i).Properties(0), 4) <> "MSys" Then
Debug.Print MyDatabase.TableDefs(i).Name
MyDatabase.TableDefs(i).Name = "NK" &
MyDatabase.TableDefs(i).Name
CurrentDb.TableDefs.Append MyDatabase.TableDefs(i)
End If
Next i
There is a surprising result to this code. The table names in the NWNKBE
database are actually being changed! I had expected the local copy of it to
be changed, not the original.
What I'd like to do is to create a set of uniquely named linked tables from
a set of 3 databases, all verisons of Northwind. So, they all have the same
set of tables, names and all. I just want to have uniquely named links to
them. I can do that manually quite easily.
Thanks for your advice on this. I'll be looking at all the books for
information, too.
Tom Ellison
Dim MyDatabase As Database, i As Integer
Set MyDatabase = OpenDatabase("D:\NWNKBE.mdb")
For i = 0 To MyDatabase.TableDefs.Count - 1
If Left(MyDatabase.TableDefs(i).Properties(0), 4) <> "MSys" Then
Debug.Print MyDatabase.TableDefs(i).Name
MyDatabase.TableDefs(i).Name = "NK" &
MyDatabase.TableDefs(i).Name
CurrentDb.TableDefs.Append MyDatabase.TableDefs(i)
End If
Next i
There is a surprising result to this code. The table names in the NWNKBE
database are actually being changed! I had expected the local copy of it to
be changed, not the original.
What I'd like to do is to create a set of uniquely named linked tables from
a set of 3 databases, all verisons of Northwind. So, they all have the same
set of tables, names and all. I just want to have uniquely named links to
them. I can do that manually quite easily.
Thanks for your advice on this. I'll be looking at all the books for
information, too.
Tom Ellison