Results 1 to 5 of 5

Thread: CrossTab Query

  1. #1
    Join Date
    Mar 2004
    Posts
    69

    Unanswered: CrossTab Query

    I've got a cross tab query which shows the Expiry dates of training and if the course has been passed failed. I've combined the Date and Pass/Fail into one field which the cross Tab query displays. Only thing now is that I want to put coditional formatting on the field to change the text red if the date part of the string has expired (<Now). The feild is in the format
    20/08/2004 : Pass
    Is it possible within the conditional formatting tools of access to just look at the Date part of this string. Any help would be appreciated. I'm having problems with the syntax of expressions withing the conditional formatting tools.

  2. #2
    Join Date
    Sep 2003
    Location
    Caldes de Malavella, Spain
    Posts
    244
    If you want to display the conditional formatting in a form, you'll need your two fields instead of combining them. Then you can set the background and foreground colours of one field depending on the contents of the other, although you can't do this if you are displaying the data in continuous forms.

    If you want the formatting in a report, the same thing applies but you would use the detail section's "OnFormat" event to examine the value of one field and set the formatting in the other.

    Hope this helps!!
    Andy Briggs
    Elmhurst Solutions Limited
    Database Development and Consultancy
    http://www.elmhurstsolutions.com

  3. #3
    Join Date
    Sep 2003
    Location
    Caldes de Malavella, Spain
    Posts
    244
    I should also add that you cannot do conditional formatting in tables or queries directly, with the exception of Yes/No fields in a table.
    Andy Briggs
    Elmhurst Solutions Limited
    Database Development and Consultancy
    http://www.elmhurstsolutions.com

  4. #4
    Join Date
    Mar 2004
    Posts
    69

    Conditionall formatting

    I had a control on a report called A, the value of which will be in the form od a string
    "20/03/2004 : Pass"
    I wanted to use conditional formatting on the control in the report to change the text colour if the date in the string has expired I found the solution for the expression to be.

    (Now()>(DateValue(Left(A.Value,10))))

  5. #5
    Join Date
    Mar 2004
    Posts
    69

    Conditional formatting

    I had a control on a report called A, the value of which will be in the form od a string
    "20/03/2004 : Pass"
    I wanted to use conditional formatting on the control in the report to change the text colour if the date in the string has expired I found the solution for the expression to be.

    (Now()>(DateValue(Left(A.Value,10))))

Posting Permissions

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