By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,473 Members | 1,274 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,473 IT Pros & Developers. It's quick & easy.

User defined colour for conditional formatting

P: 15
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.backcolor property, but it changes colour of entire datasheet form - not what I need.

Thank you for hints.

Access 2007
Jan 1 '15 #1

✓ answered 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:

http://bytes.com/topic/access/answer...ng-colors-code

-Stewart

Share this Question
Share on Google+
3 Replies


twinnyfo
Expert Mod 2.5K+
P: 3,482
Unfortunately, the Conditional Formatting is very limited in MS Access. The colors available are the colors available. I have the same complaint.
Jan 2 '15 #2

Expert Mod 2.5K+
P: 2,545
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:

http://bytes.com/topic/access/answer...ng-colors-code

-Stewart
Jan 2 '15 #3

P: 15
@Stewart Ross
Steward,
Thank you.
Indeed the code given in the linked post works for conditional formatting in datasheet view.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2.  
  3.     Dim lngCustomColor As Long
  4.  
  5.     lngCustomColor = -2147483633
  6.  
  7.     Me.txtMyTextBoxControl.FormatConditions(1).BackColor = lngCustomColor
  8.  
  9. End Sub
  10.  
Jan 3 '15 #4

Post your reply

Sign in to post your reply or Sign up for a free account.