report export ot excel ,keep the alias (1 Viewer)

Tfa

Registered User.
Local time
Today, 23:01
Joined
Nov 29, 2016
Messages
32
i hace some reports that i have created through some sql queries and i export them to excel with the
DoCmd.OutputTo acOutputReport, "Comments_Report", acFormatXLS, "C:\mpla_mpla.xls"
the problem is that to some columns i has some alias for example
select (NameID) as ID, (Surname) as Sur
from comments
the outut works great but it does not keep the alias
any ideas ?
 

Tfa

Registered User.
Local time
Today, 23:01
Joined
Nov 29, 2016
Messages
32
tranferspreadsheet is for table or query not for reports
 

Tfa

Registered User.
Local time
Today, 23:01
Joined
Nov 29, 2016
Messages
32
well i got
the problem is that allthough if you put aliases to the sql query the outputto get the mane of the textbox and not of the sql query so all i have to do now is go through all of my reports and check the name of the fields
btw Ranman docmd.transferspreadsheet will do the job done but i won't be able to get filtered results from the report
 

Users who are viewing this thread

Top Bottom