-
Assign label names on Export to Excel by a variable
I have a table (tmpProduct) with a product field and fields labeled Year1 thru Year10. The table is filled with sales amounts starting for year (begYr) for a selected number of years (noYrs) such as 1999 for 3 years. The sales amount for 1999 is put in year1, 2000 in year2, 2001 in year3 and the total for the three years is placed in year4.
I have a query that links tmpProduct to two other tables for additional fields. This query is exported to Excel using the following code:
DoCmd.OutputTo acOutputQuery, "qrytmpProductCrossTab", acFormatXLS, strXLS, True
I would like to change the labels for Year1 thru Year10 to match the year of the sales amount. Is there any way to assign a variable to the label field in the query? If not how can I accomplish this?
Your help is much appreciated!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|