Results 1 to 4 of 4
  1. #1
    AZstudent is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    3

    Conditional formatting to, "=sum"

    I am on the last task on my midterm and I am STUCK. In my report I have, " =Sum([ReEnrollmentFee]) " in my group footer. Well now I have to some how use conditional formatting so that when any of the values (results from the 'sum') are , " equal to 0 " it will appear in red. I just can not remember how to go about this. Help, please.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    in 2007, right click on the textbox that contains this field and choose "conditional formatting". everything should be self explanatory from there.

    Are you going to school online? If so, be careful of your web activity while you're logged on to their server or your school account. Online schools all use 3rd party software companies to monitor web activity of your IP address associated with the account so they can prevent plagerism and cheating on exams.

    I don't know if they can track your movement outside of the their own server environment because that might be invasion of privacy, but I would guess they can, and are.

    I know that system administrators can do it in the private sector.

  3. #3
    AZstudent is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    3
    Ok I'm sorry but my novice level is really going to shine through right now. You said to right click the 'text box' ?? Ok so I went to design view for my report, went to the ExpirationDate Footer, then went to the totals field where I have it totaling - " =Sum([ReEnrollmentFee]) " I right clicked but I do not have a option for "conditional formatting". Next question though, lets say I did, is that going to be an "IIf" function?? If so how do I write that one, I mean the part about making the 'zero values, RED' ?

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    don't do anything in the footer. report footers and page footers are both summary-type sections. your records should be in the detail section of the report. in design view, there should only be one line of controls in the detail section because reports are usually continuous in nature (multiple records displayed, one after the other).

    if the menu option is not there, you might have it turned off. it is located in the access options under the ribbon menu, but I forget what section it's under. I think "current database". look for "use shortcut menus" or "use full menus".

    if that doesn't work, you can always click the property sheet icon in the design tab of the ribbon and put some code behind the "on load" event. for what you're doing, you can probably write something like this:
    Code:
    me.textbox.formatconditions.add acfieldvalue, acequal,0
    me.textbox.formatconditions(0).backcolor = RGB(255, 0, 0)
    be aware though, that you should only use the ADD code above once, NOT on the load event because it will add a condition to your textbox everytime you load the report. if you do use that, run it once only and then delete it.

    RGB() is a basic color function. you can only get red, green and blue from it. 255 is the max value for each argument. e.g. - for complete blue color, use (0,0,255).

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 04-10-2010, 10:22 AM
  2. Replies: 21
    Last Post: 06-03-2009, 05:54 PM
  3. aSTR = Dir("C:\*.*") >> "Type Mismatch"
    By JGrant in forum Programming
    Replies: 1
    Last Post: 03-28-2009, 05:17 AM
  4. Replies: 2
    Last Post: 08-31-2006, 12:19 PM
  5. "Count" and "Countif" in Reports
    By JMantei in forum Reports
    Replies: 1
    Last Post: 06-20-2006, 02:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums