S
simon
I have a table set up called Rebates, I have created a piece of VBA
which will find a file using an explorer window and then was hoping to
use TransferSpreadsheet to import a file in with this:
Sub ImportXLS()
FileName = FindFile("C:\", "Select File To Upload", "Upload Files",
"*.xls")
DoCmd.TransferSpreadsheet acImport, , "Rebates", FileName, True
End Sub
The thing is, when I try and import to the table Rebates, I get this
error:
Run-time error '2391':
Field 'F5' doesn't exist in destination table 'Rebates.'
Can anyone help me load this? The first line of the file contains the
column headings and was used to build the table 'Rebates'. It will be
the same format loaded to this table each month.
which will find a file using an explorer window and then was hoping to
use TransferSpreadsheet to import a file in with this:
Sub ImportXLS()
FileName = FindFile("C:\", "Select File To Upload", "Upload Files",
"*.xls")
DoCmd.TransferSpreadsheet acImport, , "Rebates", FileName, True
End Sub
The thing is, when I try and import to the table Rebates, I get this
error:
Run-time error '2391':
Field 'F5' doesn't exist in destination table 'Rebates.'
Can anyone help me load this? The first line of the file contains the
column headings and was used to build the table 'Rebates'. It will be
the same format loaded to this table each month.