Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2012
    Posts
    14

    Unanswered: Conditional Formatting

    Hi Guys,
    I'm working on a report which, among other things, contains two numerical values. The conditional formatting on these values is that if they are >= 1000 they will turn red. There's also a text field on the report which can be either Yes or No....if this text field is set to Yes, i'd like the conditional formatting on the two numerical values to change to >= 500 before it turns red.

    Is this possible ?

    Thanks,
    Maggie

  2. #2
    Join Date
    Jul 2012
    Posts
    14
    Ah well ok...looks like i'm screwed on the formatting. Maybe you guys could help me with something else.
    I have a table which records the status of various pieces of equipment. The result entered into the table will be either Pass or Fail. I'm trying to set up a query which will count 1)The number of Passes 2)The number of Fails and 3)The number of units yet to be tested.

    I'm trying to use the Count function but keep getting some kind of Mismatch error

    Thanks

  3. #3
    Join Date
    Mar 2009
    Location
    Gatineau, Quebec Canada
    Posts
    147
    Provided Answers: 1
    Try using the forecolor property for a textbox, and experiment a bit. See ForeColor Property [Access 2003 VBA Language Reference].

    This took me a Google and a testing for all of five minutes (the property definitely works)! Experiment a bit first, and then ask.

    Regards

    John S
    Aylmer, Quebec, Canada

    Quote Originally Posted by Maggie34 View Post
    Hi Guys,
    I'm working on a report which, among other things, contains two numerical values. The conditional formatting on these values is that if they are >= 1000 they will turn red. There's also a text field on the report which can be either Yes or No....if this text field is set to Yes, i'd like the conditional formatting on the two numerical values to change to >= 500 before it turns red.

    Is this possible ?

    Thanks,
    Maggie

  4. #4
    Join Date
    Mar 2009
    Location
    Gatineau, Quebec Canada
    Posts
    147
    Provided Answers: 1
    Should work for Reports too. Experiment.

  5. #5
    Join Date
    Jul 2012
    Posts
    14
    Hi praxis, thanks for the information. I followed the link and read the article but alas my knowledge of Access is fairly limited and i don't really understand what it is i'm supposed to do....sorry

  6. #6
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    If I understand you correctly, if the Text Field is "Yes," turn the numerical Field Red if it's >=500; if it's "No," only turn the numerical Field Red if it's >=1000. Is that right?

    I also assume that the 'Text Field' actually is defined as a Text Datatype, not as a Yes/No Field.

    In Report Design View
    • Right-Click on a Control with the Numeric Field
    • Click on Conditional Formatting
    • Under Condition1 select Expression Is
    • In the box to the right enter [TextFieldName]="Yes" And [NumberField1]>=500
    • Use the icons to format the BackColor/ForeColor as you want
    • Click on Add>>
    • Under Condition2 select Expression Is
    • In the box to the right enter [TextFieldName]="No" And [NumberField1]>=1000
    • Use the icons to format the BackColor/ForeColor as you want
    • Click on OK


    You'll need to replace TextFieldName and NumberField with the actual names of the appropriate Controls. And in Conditional Formatting, the names always have to be enclosed in Square Brackets, as shown.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  7. #7
    Join Date
    Jul 2012
    Posts
    14
    Thanks a lot Missinglinq.....it works perfectly. Your instructions were very easy to follow even for a beginner.

    Don't suppose you've any ideas on the query ?

  8. #8
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    I didn't even see that! You need to post that in a new, separate thread, with an appropriate title, so that hopefully someone with expertise in that kind of stuff will see it and jump in.

    Would also help us help you if you post what you've tried.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  9. #9
    Join Date
    Jul 2012
    Posts
    14
    Ok so....i'll put it in a seaprate thread. Thanks again for your help.

Posting Permissions

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