Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003

    Unanswered: Crosstab Column Heading

    I have a crosstab query with a Date field used as the column heading.

    Is there anyway to specify date ranges and still use this field as a column heading? For example, I need the dates >= 1/1/03 and <=Date() to be listed in a column with the heading "Prior" and Dates>= Date() would be listed as the respective date for the column heading?

  2. #2
    Join Date
    Feb 2003
    Auckland, NZ
    I would suggest first creating another query and with the date you can create the following field

    Iff(dates >= 1/1/03 and <=Date() , 'Prior', Dates)

    This will then create the field with the values you want. Now base the Cross-tab query on this query.
    JJ Kennedy
    Double J IT Solutions

    VB 6, VB.NET, ASP.NET, MS SQL Server, MySQL, MS Access

  3. #3
    Join Date
    May 2003
    Thanks ... for your response however, I discovered that the "switch" function works quite nicely.

    Dates: Switch([Date]>=Date()+365,">" & Format(Date()+365,"mm/yy"),[Date]>=Date() And [DAte]<=Date()+365,[Date],[Date]<=Date(),"<" & Format(Date(),"mm/yy"))

Posting Permissions

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