Results 1 to 5 of 5
  1. #1
    Dragon1966 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    2

    Retrieve Datasheet Cell Color

    Hi



    I'm using conditional formatting on a datasheet to change the background color of a cell. Is is possible to retrieve that color?

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    This is a form in datasheet view? What do you mean by 'retrieve'? You want to know the color code? How did you pick the color for formatting rule? Did you use the standard colors or one of the custom palettes?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Dragon1966 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    2
    Quote Originally Posted by June7 View Post
    This is a form in datasheet view? What do you mean by 'retrieve'? You want to know the color code? How did you pick the color for formatting rule? Did you use the standard colors or one of the custom palettes?
    Hi I've set the colour using conditional formatting but rather than test for each condition I just want to grab the background colour set by the condition. For example if the Priority = 1 the colour may be for example Red, if 2 Green and so on... I could just test for the conditions set but this seems like double the effort especially when the colour is being set in the "cell" already...

    For example ... Click image for larger version. 

Name:	Capture.JPG 
Views:	15 
Size:	34.2 KB 
ID:	18257

    If I could grab the background colour it would make life soooo much easier...

    Thanks

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    I don't know anyway to programmatically 'grab' the color code from the conditional format rule setup.

    Why do these fields show number and description combined?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by Dragon1966 View Post

    ...but rather than test for each condition I just want to grab the background colour set by the condition...
    Sorry, but I'm afraid you're stuck with using the same test as you use for setting the formatting.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Please reply to this thread with any new information or opinions.

Similar Threads

  1. datasheet fill color changes
    By trevor40 in forum Forms
    Replies: 2
    Last Post: 03-05-2014, 09:43 PM
  2. how to format Datasheet view cell
    By selvakumar.arc in forum Forms
    Replies: 4
    Last Post: 07-02-2013, 02:05 PM
  3. Replies: 2
    Last Post: 03-05-2013, 04:11 PM
  4. change cell color
    By bishop743 in forum Programming
    Replies: 0
    Last Post: 02-01-2009, 11:00 AM
  5. Can we post Access cell data to Excel cell properties?
    By Zethro in forum Import/Export Data
    Replies: 1
    Last Post: 12-13-2005, 08:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums