i have much more that 2GB of data in several .CSV files that I'm trying to convert into access databases. I've set up everything i need to read and write into the databases.
I have a "main" database that has the linked tables to all of these databases, which are named in sequence (as implied below).
I have the data-only databases made and ready.
Currently, I have a form in the main database that collects this data, creates the new data-only databases as neccissary, and then creates a linked table to this new data-only database. However, the migration is going too slowly and I want to create another series of access files that contain forms that handle pre-determined sections of the .CSV files.
What all of this boils down to is this:
A simplified version of what I currently have is this:
Set dbLocal = Currentdb()
Set tbfNewAttached = dbLocal.CreateTableDef("zzooo")
With tbfNewAttached
.Connect = ";database=K:\Common\Database\Aisin Hub\Tester Data\Tester Pass 000001.mdb"
.SourceTableName = "Quality - Tester Pass"
End With
dbLocal.TableDefs.Append tbfNewAttached
dbLocal.Close
Set dbLocal = Nothing
Set tbfNewAttached = Nothing
This works quite well, however I no longer want to create this linked table from the "main hub" database, so essentially what I want to do is this:
Set dbLocal = OpenDatabase("K:\Common\Database\Aisin Hub\Aisin.mdb")
Set tbfNewAttached = dbLocal.CreateTableDef("zzooo")
With tbfNewAttached
.Connect = ";database=K:\Common\Database\Aisin Hub\Tester Data\Tester Pass 000001.mdb"
.SourceTableName = "Quality - Tester Pass"
End With
dbLocal.TableDefs.Append tbfNewAttached
dbLocal.Close
Set dbLocal = Nothing
Set tbfNewAttached = Nothing
I get the subject error at the line "dbLocal.TableDefs.Append tbfNewAttached"
Any ideas?
I have a "main" database that has the linked tables to all of these databases, which are named in sequence (as implied below).
I have the data-only databases made and ready.
Currently, I have a form in the main database that collects this data, creates the new data-only databases as neccissary, and then creates a linked table to this new data-only database. However, the migration is going too slowly and I want to create another series of access files that contain forms that handle pre-determined sections of the .CSV files.
What all of this boils down to is this:
A simplified version of what I currently have is this:
Set dbLocal = Currentdb()
Set tbfNewAttached = dbLocal.CreateTableDef("zzooo")
With tbfNewAttached
.Connect = ";database=K:\Common\Database\Aisin Hub\Tester Data\Tester Pass 000001.mdb"
.SourceTableName = "Quality - Tester Pass"
End With
dbLocal.TableDefs.Append tbfNewAttached
dbLocal.Close
Set dbLocal = Nothing
Set tbfNewAttached = Nothing
This works quite well, however I no longer want to create this linked table from the "main hub" database, so essentially what I want to do is this:
Set dbLocal = OpenDatabase("K:\Common\Database\Aisin Hub\Aisin.mdb")
Set tbfNewAttached = dbLocal.CreateTableDef("zzooo")
With tbfNewAttached
.Connect = ";database=K:\Common\Database\Aisin Hub\Tester Data\Tester Pass 000001.mdb"
.SourceTableName = "Quality - Tester Pass"
End With
dbLocal.TableDefs.Append tbfNewAttached
dbLocal.Close
Set dbLocal = Nothing
Set tbfNewAttached = Nothing
I get the subject error at the line "dbLocal.TableDefs.Append tbfNewAttached"
Any ideas?