Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    10

    Unanswered: too many feilds defined

    hi, Im trying to export data in an access table to excel. Im using doCmd.transferspreadsheet and its giving me the error "Too many feilds defined".

    My table has 117 feilds in it but only contains 1 record. It is created on the fly by pulling data from a number of different tables for the purpose of doing the export to excel. If in my doCmd.transferSpreadsheet command I dont specify a range it works fine and the data is transfered to a sheet with the same name as my table. But I will need to put more data below this, so I need to be able to export to a specific range.

    my command so far looks like this:
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "tempConcise", pathVariable, , "Data!A1:DN2"

    note DN2 is the excel cell that then last feild gets written to when I dont specify a range

    any ideas why its throwing the "Too many feilds defined" error
    Last edited by dav_evans; 02-10-04 at 00:08.

  2. #2
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Smile Re: too many feilds defined

    Originally posted by dav_evans
    hi, Im trying to export data in an access table to excel. Im using doCmd.transferspreadsheet and its giving me the error "Too many feilds defined".

    My table has 117 feilds in it but only contains 1 record. It is created on the fly by pulling data from a number of different tables for the purpose of doing the export to excel. If in my doCmd.transferSpreadsheet command I dont specify a range it works fine and the data is transfered to a sheet with the same name as my table. But I will need to put more data below this, so I need to be able to export to a specific range.

    my command so far looks like this:
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "tempConcise", pathVariable, , "Data!A1N2"

    note DN2 is the excel cell that then last feild gets written to when I dont specify a range

    any ideas why its throwing the "Too many feilds defined" error
    Have you tried specifiying a larger range than you need? Maybe give it a little room for unforseen circumstances.

    Just something I might try if it were me.

    Gregg

  3. #3
    Join Date
    Nov 2003
    Posts
    10
    Hi Gregg,
    yeah I tried that. I gave it extra room well past DN and i still throws the error. When I was testing it I reduced my query to only output 4 feilds, and made the range "Data!A12" and it gave me the same error again.

Posting Permissions

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