Consulting

Results 1 to 2 of 2

Thread: Error Messege when Exporting

  1. #1
    VBAX Regular
    Joined
    Jan 2005
    Posts
    10
    Location

    Error Messege when Exporting

    I am receiving the following error messege when trying to export to excel with the code.
    Error: "There are too many rows to output, based on the limitation specified by the output format or by Microsoft Access"

    Code: DoCmd.OutputTo acOutputQuery, "query1", "MicrosoftExcel(*.xls)", "path"

    The table that I was attempting to output was 17000 rows and 14 columns, both seemingly well within excel's limits.

    Additionally, I tried to export the same table and lost a couple hundred records. None of the fields are that large.

    Any help would be greatly appreciated.

    Thanks

  2. #2
    VBAX Regular ___'s Avatar
    Joined
    Jun 2004
    Posts
    22
    Location
    Microsoft Access defaults to the Excel 5.0 specification for backward compatibility. Try using the TransferSpreadsheet method ....

    [vba]
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel2000, "YourQuery", "C:\Test\YourFile.xls", True
    [/vba]

    HTH
    Nemo hic adest illius nominis
    ??????????????????
    ??????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •