Amaryllis
10-26-2005, 07:22 PM
Hello..
I need some help here. What should I do to transfer an Access table to Excel. I heard about the TransferSreadsheet function before, but my problem is I want to change the table header while transfering it to Access.
Pat Hartman
10-26-2005, 09:52 PM
You changed directions. You started with Access to Excel and ended with Excel to Access. I'm assuming the first direction is correct but I don't know what a table header is. Are you talking about the column names? or the sheet name that Access creates?
In either case, you would solve the problem by creating a query. In the query, you can provide "alias" names for each field by putting the alias in the field cell of the QBE and separating the alias from the real name with a colon:
AliasName1:Fld1
AliasName2:Fld2
You can then substitute the query name for the table name in the TransferSpreadsheet. The queryname will be used as the sheet name when Access creates the spreadsheet.