Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002

    Question Unanswered: Crosstab report question

    I've created a report that reads from a crosstab query with dates going accross the top. I would like to have the report automatically update the dates and data associated with those dates based on the day in the system clock. My problem is that the crosstab query can query the new dates as time goes on just fine, but the report is looking for the dates (column header names) that were in the crosstab query when it was first built. How do I make the report automatically look for the new date column headers that are in the query as time goes on? Make sense?


  2. #2
    Join Date
    Aug 2002
    Québec, Canada
    You can use one of the date function available : NOW(), DATE(), YEAR(NOW()), and use it in your field source. You might try to put those directly in the TExtbox, for example, instead of 2000, you put YEAR(NOW()) - 2

    Or, you can do it on the FORM_OPEN event, here is snippet of code from a report I used:

        'This is to set the label to the good YEAR
        lblYear1.Properties.Item(3) = Year(Now())
        'Year 1
            'This is the textbox
            txtYear1.Properties.Item(3) = Year(Now())
            'This is a textbox holding an average
            txtAverage1.Properties.Item(3) = "=Avg([" & Year(Now())
     & "])"

Posting Permissions

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