Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Posts
    61

    Question Unanswered: Changing Query Field Names Dynamically

    I have a query that totals the number of items that were sold for two separate years. i.e.,

    Item Year1 Year 2
    Toys 123 213
    Food 321 215
    Fuel 651 871

    I want to be able to change the field names depending on the two years compared. I need this because I am displaying this data on a graph and I want the legend to display the years that are displayed.


    Once again, Thank you,

  2. #2
    Join Date
    Jan 2003
    Posts
    46
    Hmm! It seems that a similiar question arose last week.

    Your graph will be based on a crosstab query, so set the year field as a row heading. The legend will automatically pick up the values from the years being compared.

    Cheers,
    Zambezibill

  3. #3
    Join Date
    Oct 2002
    Posts
    61

    Thumbs up Field Names

    Crosstab, now why didn't I think of that? Thanks that will make life much easier!!



    Regards,

  4. #4
    Join Date
    Oct 2002
    Posts
    61

    Re: Field Names

    zambezibill

    I tried the cross-tab idea that you suggested and it worked the first time that I used ran the report, but when I changed the dates of the query to display different data, I received an error message because the row-source was looking for the field names from the first time I ran the report. Now I guess I am back a square one. I was wondering if there is a way to create a new report each time it is needed?


    Thanks!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •