• Format report data on open based on value

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Format report data on open based on value

    Author
    Topic
    #465130

    Hi!

    I have a report that when it loads I would like results to change color based on the value. So if [1] > 25 then the color of [1] would be red adn it would be bold. Is this possible and if so what the code look like? Would I put it on the load event of the report or in each different control on the report?

    Thanks!
    Leesha

    Viewing 2 reply threads
    Author
    Replies
    • #1193747

      You can use conditional formatting:
      – Open the report in design view.
      – Select one or more text boxes and/or combo boxes.
      – Select Format | Conditional formatting… (in Access 2000-2003) or activate the Format tab of the ribbon and click Conditional in the Font group (in Access 2007 and later).
      – You can specify a condition on the value of the control, or an expression (i.e. a formula), and formatting to be applied if the condition is true.
      No code needed!

    • #1193761

      If you don’t want to use conditional formatting, you might want to look at setting properties on the On Format Events,
      of the Report Sections

    • #1193834

      OMG!!! That was simply too easy! I love it!

      BTW, I didn’t get an email for either of these two responses. They aren’t in my spam either.

      Thanks!
      Leesha

      • #1193835

        BTW, I didn’t get an email for either of these two responses. They aren’t in my spam either.

        Notifications appear to be broken again; it has already been reported in the Feedback to Admins forum.

    Viewing 2 reply threads
    Reply To: Format report data on open based on value

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: