Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2005
    Posts
    183

    Unanswered: Enabled = false, row by row?

    I have a subform that shows 1 to 400 member rows per company... Its possible to tick a box "retired" which essential means this member is no longer active.

    When done, I'd like to grey out that particular line, to make it more visible that this member is retired..

    Code:
        If kryds_udeladt = -1 Then
            txt_Medlemsnummer.Enabled = False
            txt_Medlemsnummer.Locked = False
        End If
    When I use the above code on the subforms "Oncurrent" action, its grey out all rows, if there's even one member with retired to set true... How do I go about this?

    Cheers, Trin
    IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....

  2. #2
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    Right click on any field in the record, select Conditional Formatting, and you can set that field's background color according to the "Retired" field. Then you can do this to all the fields in the record, one at a time. This has to be done in Design View for the form.

  3. #3
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    The condition in conditional formatting is only compared to that field. You
    can't set the condition based on a different field.

    You may want to look at the help file for FormatConditions property. I think
    you'd be able to do it that way.
    Inspiration Through Fermentation

  4. #4
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    If you use the drop down box within Conditional Formatting that is labeled "Condition 1" (or 2, 3, whatever) you will see "Expression Is" Select that, then make the expression be [Retired] = True and that does work. I just did it, again.

  5. #5
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Quote Originally Posted by GolferGuy
    If you use the drop down box within Conditional Formatting that is labeled "Condition 1" (or 2, 3, whatever) you will see "Expression Is" Select that, then make the expression be [Retired] = True and that does work. I just did it, again.
    You're right. I stand corrected. Now I know there's an easier way to do this.
    Inspiration Through Fermentation

Posting Permissions

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