473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

User defined colour for conditional formatting

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

3 1171
twinnyfo
3,653 Expert Mod 2GB
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
Stewart Ross
2,545 Expert Mod 2GB
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
MarcinM
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

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

Similar topics

3
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be...
2
by: Terry | last post by:
I have a form which displays data from both the Student Details table and the Exam Details table. The Name (Text Box) control is from the Student Details table and the Withdrawn (Check Box)...
4
by: Bradley | last post by:
I have an A2000 database in which I have a continuous form with a tick box. There is also a text box with a conditional format that is based on the expression , if it's true then change the...
2
by: Megan | last post by:
Can you write conditional VBA code that affects only one or two records on a continuous subform? I have a form with a subform on it. The parent/ child field that links the forms is CaseID. The...
4
by: mugen | last post by:
i've been trying to get conditional formatting to work via a tick box. this is on a form i have a text box that i'd like to have the background colour change based on a tick box. the text box...
2
by: Julian | last post by:
I setup a Conditional formatting on one of my columns with an expression that looks like: Like "Wrong Number" with some reddish highlight (fill). The fill shows on the screen, but does not print....
1
by: aman909 | last post by:
Hello, Im trying to use conditional formatting in a text box on a form. What im trying to do is that conditional formatting changes the colour of the text in the text box. I need the...
1
by: Mark A | last post by:
I've got a continuous form that is just for display, so hence all items on it are set to Enabled = No, Locked = Yes. This has the desired effect of making the item unclickable - exactly what I...
4
by: riaane | last post by:
Please help: I have Conditional Formatting on a Report Field that fills the background Red if the criteria is met. This displays correctly in Report View, however, when I "OutputTo" this report to...
8
by: LizaHawkins | last post by:
I have a drop down box on a continuous form called (cmbItem) When the users choose Option 6 (Other)or on the open event I wish to show another field txtOther which allows the user to give a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.