Share via

Crosstab query using conditional formatting on second value field

Anonymous
2016-06-07T12:29:45+00:00

I have a report based on a crosstab query (created from a select query) that lists employees and dates of various types of training they have taken.  The training topics to be reflected on the report are selected by the user.  Each training topic has its own expiration date which is calculated to show when each employee's training will expire.  We would like to use conditional formatting in the report to show if the training is within 60 days from expiring (yellow), 30 days from expiring (orange), or has expired (red).  I would guess that in order for the conditional formatting to be used with the expiration date, that the expiration date field must be included on the report, however, a crosstab query will not allow two value fields, and I need to keep the training date on the report.  I need to keep the report style like a matrix.  Any suggestions?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2016-06-08T13:28:30+00:00

    I think I figured out the answer to my own question.  May not be the most ideal, but it seems to work.  I created a calculated field in my select query (from which the crosstab is created), that combines a prefix code with the training date.  Using multiple IIf statements comparing the expiration date to the current date, the code indicates if it is expired, within 60 days, within 60 days, or is good.  Then my conditional formatting looks for those codes using the greater than operator.

    Was this answer helpful?

    0 comments No comments