Results 1 to 3 of 3
  1. #1
    markvoltz is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2016
    Posts
    1

    Question How to enable export to dbf through VBA scripts

    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!

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    the error message is telling you all. Support for dbase was dropped in 2013 - see this link, about 6th item down.

    https://support.office.com/en-us/art...D-9A2DFEF68E2F

  3. #3
    trevor40's Avatar
    trevor40 is offline Advanced db Manager
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    402
    Quote Originally Posted by Ajax View Post
    the error message is telling you all. Support for dbase was dropped in 2013 - see this link, about 6th item down.

    https://support.office.com/en-us/art...D-9A2DFEF68E2F
    You will have to do it in two steps
    first export to a file type that dbase can handle and that access can export to, then use dbase to import from the file you exported to.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Generate Scripts equivalent for MS-Access
    By xfp39024 in forum Access
    Replies: 1
    Last Post: 07-13-2013, 04:31 PM
  2. Replies: 2
    Last Post: 02-13-2013, 04:09 PM
  3. Creating tables from scripts
    By accesscoder in forum Import/Export Data
    Replies: 6
    Last Post: 10-18-2010, 04:42 PM
  4. could not enable autocorrect
    By easbrandel in forum Access
    Replies: 0
    Last Post: 04-15-2010, 07:10 AM
  5. Database scripts
    By dvongrad in forum Access
    Replies: 1
    Last Post: 12-02-2009, 09:28 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums