Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2012
    Posts
    13

    Unanswered: Expression for changing text box color

    I am using Access 2007 and I would like to change the color of a text box based on the information in it.

    For instance (this is a church database), if one of the member is deceased, I would like to gray the text boxes for all their information.

    I am not good with code so I figured I would just use an IF/THEN expression, but I'm not sure I understand when to use quotes or double quotes, IIF or IF, etc etc. Is there a guide or can someone help with this?

    Thanks

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Unless this is a Single View Form (i.e. only one Record is viewable at a time) you'll have to do it with Conditional Formatting, and I'd do it that way, regardless of the Form View. How do you indicate that a member is deceased?

    Linq ;0)>
    Last edited by Missinglinq; 12-27-12 at 23:34.
    Hope this helps!

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

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Oct 2012
    Posts
    13
    Currently I have a combo box that indicates the persons current membership. For instance: Active, Inactive, Child, Deceased

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    In Form Design View:
    1. Right-Click on the Control to be Formatted
    2. Click on Conditional Format
    3. In Condition1 dropdown select Expression Is
    4. In the box to the right type [MembershipComboboxName] = "Deceased"
    5. Select the Formatting you want using the icons
    6. Click on OK


    Replace [MembershipComboboxName] with the actual name of your Combobox; be sure to include the Square Brackets.

    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

  5. #5
    Join Date
    Oct 2012
    Posts
    13
    Awesome.. Thanks!
    Caryn

  6. #6
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Glad we could help!

    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

Posting Permissions

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