Results 1 to 6 of 6
  1. #1
    PoorCadaver is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Oct 2011
    Posts
    68

    Change color on text using column value?

    Hi!



    How do I use a value in a column to make a textbox change color? I can explain what I mean:
    Right now when a value in a column is supposed to be disabled, I have made the font color grey instead of black using conditional formatting. But this only works with the object it's connected to. So how do I do if I want do use col1 to control the color of col2?

    I use Access 2000.

    /Jonas

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Use Expression Is instead of Field Value Is.

    [Col1] = Whatever
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    PoorCadaver is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Oct 2011
    Posts
    68
    Quote Originally Posted by pbaldy View Post
    Use Expression Is instead of Field Value Is.

    [Col1] = Whatever
    Great, thanks! Just one more thing...
    If I want to select those with i.e. "ABC old" I want to code something like [Col1]="*old" but it doesn't work. What's the right way to do it?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    To use a wildcard you have to use Like instead of =.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    PoorCadaver is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Oct 2011
    Posts
    68
    Thanks!
    What I did was this:
    [Col1] Like "*old*"

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 4
    Last Post: 12-25-2011, 06:31 PM
  2. Replies: 1
    Last Post: 12-14-2010, 10:03 PM
  3. Using an event to change color of text.
    By michaeljohnh in forum Programming
    Replies: 3
    Last Post: 08-30-2010, 12:30 PM
  4. Change the text box color on form load
    By mikec in forum Programming
    Replies: 2
    Last Post: 03-01-2010, 11:47 PM
  5. Replies: 1
    Last Post: 03-29-2009, 08:27 AM

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