Tables already exist in Acces Database. Based on those table and field names I am creating a Cross Tab Query. For this reason I cannot change the name of the fields in my table.
Thank you both for your valuable input. The Code below seems to work:
Sub GetDataFromClosedWorkbook()
Dim wb As Workbook
Dim db As Database, rec As Recordset
Dim wb As Workbook
Dim x As String, y As String, z As String
Dim A As String, B As String, C As String
Set db = CurrentDb
Set rec =...
I tried that too, making
"DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, sTable, "c:\mytestfile.xls", False
"
False
but same error.
When you try to import using File > Import > FilName > Uncheck "First Row Contains Row Headings"
you will have to...
To: LNBruno
The Error is
"Field 'F1' doesn't exist in destination table 'tblChild.'"
once again this is due to NO COLUMN HEADING.
if I set the column headings in excle file to match my table in access, it works just great.
Ok I nave this new req.
I am trying to import excle file into access table using VBA code. Excel file DOES NOT have any column heading.
I cannot use "DoCmd.TransferSpreadsheet " because it will give me error.
Any suggestions ??????
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.