Thnaks, using the alias with the query is a good ideas, but my real problem
is not the query, but the name of the fields on the report itself. The name
of the field on the report is something like txtSales0601 where the 06
represents the fiscal year and the 01 the pay period. The pay periods do not
change from year to year. There will always be 26 pay periods. Is there a
way, using VB, to change the name of the field, for example, from
txtSales0601 to txtSales01. The reason I set up the report that way in the
first place is when someone exports to Excel the field name becomes the
column header, which is convenient. Well, it's convenient until the fiscal
year changes.
> >I have a report that is linked to a query which has around 52 fields that
> >change when the fiscal years changes. For example the fields may be
[quoted text clipped - 20 lines]
> that it has a FY field and a set ot value fields instead of
> a wild list ot fields for each FY.
Marshall Barton - 18 Sep 2006 15:19 GMT
I understand what you are saying, but trying to mess with
the report is not the solution.
The real problem is the name of the fields in the table.
You should never have information in a table field name.
As I said before, the proper way to design your tables is to
have one field for the year, another for the pay period, and
others for the data associated with the pay period. In
general, your tables should be tall and narrow, not wide and
short. Someone once explained this by saying that table
fields are very expensive, but rows are cheap.
Bottom line, I don't think there is a reasonable way to
twist the report into dealing with your current table/query
structure.

Signature
Marsh
MVP [MS Access]
>Thnaks, using the alias with the query is a good ideas, but my real problem
>is not the query, but the name of the fields on the report itself. The name
[quoted text clipped - 31 lines]
>> that it has a FY field and a set ot value fields instead of
>> a wild list ot fields for each FY.