Transfer Spreadsheet - Use Captions Not Filenames

dazstarr

Registered User.
Local time
Today, 23:34
Joined
Mar 19, 2007
Messages
132
Can someone advise me how to use Captions and not Access actual fieldnames when transferring a query into Excel please?

I have the following line of code which exports the query - it works fine but I need it to use captions instead of the fieldnames.

/code
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryMMSpreadsheetReport", "J:\EDIMIS\Exclusions\Daz_Test.xls", True
\code

Many Thanks in advance.
Daz
 
Design your query and use alias names in your column headings for the actual field names you want to see in Excel.
 
Thanks for replying.

Is there no way I can point the code to use the captions instead?

The database is huge and has lots of code in different places and would rather leave the query and table as it is.

Thanks
Daz
 
Sorry I think I mis-understood your thread.

Do you mean EG:

FullPupilName
Pupil Name: FullPupilName

Thanks
Daz
 
Sorted it - I did as above.

Thanks for your help.

Daz
 

Users who are viewing this thread

Back
Top Bottom