Transfer Spreadsheet - Use Captions Not Filenames (1 Viewer)

dazstarr

Registered User.
Local time
Today, 23:09
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
 

DCrake

Remembered
Local time
Today, 23:09
Joined
Jun 8, 2005
Messages
8,626
Design your query and use alias names in your column headings for the actual field names you want to see in Excel.
 

dazstarr

Registered User.
Local time
Today, 23:09
Joined
Mar 19, 2007
Messages
132
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
 

dazstarr

Registered User.
Local time
Today, 23:09
Joined
Mar 19, 2007
Messages
132
Sorry I think I mis-understood your thread.

Do you mean EG:

FullPupilName
Pupil Name: FullPupilName

Thanks
Daz
 

dazstarr

Registered User.
Local time
Today, 23:09
Joined
Mar 19, 2007
Messages
132
Sorted it - I did as above.

Thanks for your help.

Daz
 

Users who are viewing this thread

Top Bottom