• Conditional formatting of a text box

    Author
    Topic
    #464588

    I have a tax return form, in single view, which has a set of check boxes that are not appropriate to corporation tax returns. When the data for the field is selected from the [TRType] I would like the text box to go grey. So the user selects the [TRType] field to be Corporation Tax” and I can use conditional formatting to get the text box to grey over, no problem. The nub is how to keep the text box transparent when the [TRType] is not “Corporation Tax”. Can this be done please?

    Viewing 3 reply threads
    Author
    Replies
    • #1189738

      Doesn’t that happen automatically?

    • #1189741

      Hi Hans. No it doesn’t happen automatically, but I did expect it too. I created the text box, the conditional format does not have a colour of transparent.

      • #1189742

        Perhaps it’s better to change the formatting in the On Current event of the form and in the After Update event of TRType.

    • #1189751

      If I leave off the conditional formatting, I can make the background of the text box be set to transparent. Adding the conditional formatting, I’m using Access 2003, causes the background to be be changed to solid when the conditional formatting IS NOT =”Corporation Tax” and functions correctly to the chosen conditional formatting colour.

    • #1189829

      Stephen,

      From your description, it sounds like you want the inappropriate buttons disabled (greyed out). If that’s the case, you need code in the Change event of the TRType check box to set the Enabled property of the text box to False, and you can forget about conditional formatting, which won’t actually disable the control.

      David A. Gray

      Designing for the Ages, One Challenge at a Time

    Viewing 3 reply threads
    Reply To: Conditional formatting of a text box

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: