User defined colour for conditional formatting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MarcinM
    New Member
    • Nov 2014
    • 15

    User defined colour for conditional formatting

    Hello,

    I would like to highlight the active cell in a subform (datasheet). It is possible to use conditional formatting to achieve that, but I would like to use a different colour than the ones available in the pallet. I haven't seen any button to add user defined colour.

    Question:
    How can it be done?

    There is also a datasheet.backc olor property, but it changes colour of entire datasheet form - not what I need.

    Thank you for hints.

    Access 2007
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3653

    #2
    Unfortunately, the Conditional Formatting is very limited in MS Access. The colors available are the colors available. I have the same complaint.

    Comment

    • Stewart Ross
      Recognized Expert Moderator Specialist
      • Feb 2008
      • 2545

      #3
      In A2010 it is possible to define background colours for conditional formatting using custom RGB values as well as what is shown in the standard palette. According to the answer linked below it should also be possible to use custom colours for conditional formatting in A2007, though I can't test this myself as I use A2010:



      -Stewart
      Last edited by Stewart Ross; Jan 2 '15, 08:03 PM.

      Comment

      • MarcinM
        New Member
        • Nov 2014
        • 15

        #4
        Originally posted by Stewart Ross
        In A2010 it is possible to define background colours for conditional formatting using custom RGB values as well as what is shown in the standard palette. According to the answer linked below it should also be possible to use custom colours for conditional formatting in A2007, though I can't test this myself as I use A2010:



        -Stewart
        Steward,
        Thank you.
        Indeed the code given in the linked post works for conditional formatting in datasheet view.

        Code:
        Private Sub Form_Open(Cancel As Integer)
        
            Dim lngCustomColor As Long
        
            lngCustomColor = -2147483633
        
            Me.txtMyTextBoxControl.FormatConditions(1).BackColor = lngCustomColor
        
        End Sub

        Comment

        Working...