Results 1 to 4 of 4
  1. #1
    kattatonic1 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Toronto, Canada
    Posts
    77

    Export to Excel displaying field names instead of captions

    My users do a lot of exporting to Excel to send things off to other people, and to use as import into other apps. My field names are like strBranch. I use captions such as Home Branch, Active Branch, Original Branch to distinguish the context in the data. Export to Excel ignores the caption property whether I put it in the underlying query or the form that the user uses. Everywhere I find this question on the internet, it has been left unanswered.

    Any help appreciated.

    Kay from Toronto


    Feels like a Monday

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I base my export on a query object and use alias' in the query object.

  3. #3
    byrne2310 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    1

    Is it possible to get an example code snippet?

    Quote Originally Posted by ItsMe View Post
    I base my export on a query object and use alias' in the query object.

    I am doing similar exports to Excel, but just starting ... Can you provide an example of the code you use? Thanks in advance!

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    If you do not know VBA very well you can use docmd.transferspreadsheet and base the export on a query object, creating the alias' in the query object and dedicating the query object to your export process.

    Something like this.... the hardest part is getting the arguments correct for the version of Excel and path to file.
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "Query1", "FullPathAndFileName", True

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

Similar Threads

  1. Replies: 2
    Last Post: 03-28-2014, 11:25 AM
  2. Replies: 3
    Last Post: 03-04-2014, 12:35 PM
  3. Replies: 7
    Last Post: 04-25-2013, 03:47 PM
  4. Export Access into multiple excel files based on field value
    By turntabl1st in forum Import/Export Data
    Replies: 7
    Last Post: 11-08-2012, 12:43 PM
  5. Replies: 1
    Last Post: 03-17-2012, 08:49 PM

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