C
Carol Chisholm
I'm importing a range called Data from a series of Excel files into an
Access DB.
I re-use a table called data, which I delete just before calling
TransferSpreadsheet:
My filenames are loaded into an array:
For o = m To 1 Step -1
fileCurrFile = FileArray(o)
....
DoCmd.DeleteObject acTable, "Data"
On Error GoTo Error_ImportData
DoCmd.SetWarnings True
DoCmd.TransferSpreadsheet , , "Data", fileCurrFile, False, "Data"
....
Next
On the first iteration it work fine, the second one fails to import
anything.
Each individual file will import if it is the first one, but not if it
is the second one, so I think the problem is with the create, delete,
re-create table sequence.
Access DB.
I re-use a table called data, which I delete just before calling
TransferSpreadsheet:
My filenames are loaded into an array:
For o = m To 1 Step -1
fileCurrFile = FileArray(o)
....
DoCmd.DeleteObject acTable, "Data"
On Error GoTo Error_ImportData
DoCmd.SetWarnings True
DoCmd.TransferSpreadsheet , , "Data", fileCurrFile, False, "Data"
....
Next
On the first iteration it work fine, the second one fails to import
anything.
Each individual file will import if it is the first one, but not if it
is the second one, so I think the problem is with the create, delete,
re-create table sequence.