Hello,
Does anyone know how to export queries to.dbf files using VBA in Access 2016? I am getting a error: "Run-time error 2507 stating that the dBASE IV type isn't an installed database type or doesn't support the operation I chose." My code currently will export to Excel spreadsheets, but I would rather export my data into a dbf format
Working code that exports spreadsheets:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Query1", "C:\MyData\MySpreadsheet.xls", False
Code that causes an error when attempting to export dbf files:
DoCmd.TransferDatabase acExport, "dBASE IV", "C:\MyData", acQuery, "Query1", "Test.dbf", False
Please let me know how to enable export to dbf as well as how to correct the code above (if needed) to export queries to .dbf files.
Thank You!