none
Conditional Formatting (VBA Access)

    Question

  • In continuous forms view, is there a way to conditionally format a particular row based on a value of one of the fields in the row?

    (I see that another user also asked this question a while back, but there was no response . . . )

    "I have 10 rows displayed on the continuous form and want to make a field visible or not visible based on  the value of another field. But either all of them are visible or all of them are not visible, I can't make it conditionally visible."

    Many thanks if any ideas!


    DragonForest

    Wednesday, December 05, 2012 6:25 AM

Answers

  • Using conditional formatting, you can set the following properties of a text box and combo box:

    Bold
    Italic
    Underline
    Fill color
    Text color
    Enabled/disabled

    You can *not*conditionally format other types of controls, and you can *not* set the visibility of controls using conditional formatting. Disabling text boxes and combo boxes conditionally is the best you can do.


    Regards, Hans Vogelaar

    • Marked as answer by DragonForest Thursday, December 06, 2012 3:34 AM
    Wednesday, December 05, 2012 7:16 AM
  • See if the following MSDN article helps:

    Extending the Functionality of Conditional Formatting in Access


    Van Dinh

    • Marked as answer by DragonForest Thursday, December 06, 2012 3:34 AM
    Wednesday, December 05, 2012 10:17 AM

All replies

  • Using conditional formatting, you can set the following properties of a text box and combo box:

    Bold
    Italic
    Underline
    Fill color
    Text color
    Enabled/disabled

    You can *not*conditionally format other types of controls, and you can *not* set the visibility of controls using conditional formatting. Disabling text boxes and combo boxes conditionally is the best you can do.


    Regards, Hans Vogelaar

    • Marked as answer by DragonForest Thursday, December 06, 2012 3:34 AM
    Wednesday, December 05, 2012 7:16 AM
  • Many thanks. That's very helpful.

    Do you have a brief snippet as to how to conditionally set the permissible properties you listed? I'm doing it manually (not in code), but it's not working.

    Assume I have a continuous form with two textboxes (TB1 linked to field F1; and TB2 linked to field F2). What would the code fragment look like to make TB1 bold, based on the value in F2?

    Many thanks!


    DragonForest

    Wednesday, December 05, 2012 9:38 AM
  • See if the following MSDN article helps:

    Extending the Functionality of Conditional Formatting in Access


    Van Dinh

    • Marked as answer by DragonForest Thursday, December 06, 2012 3:34 AM
    Wednesday, December 05, 2012 10:17 AM