My Assistant
![]() ![]() |
|
|
Apr 3 2012, 02:54 PM
Post
#1
|
|
|
New Member Posts: 10 |
All,
I have a project management database that I am creating. I have a subform in datasheet view for all the tasks of the project. Within the subform is a drop down field (list) for the status of the task. Is it possible to have the row of the record change color when I select a certain status. For example, When I change the status to completed have the row change to gray. If this is possible how do I do it? Thanks Shauna (aka. firebott) |
|
|
|
Apr 3 2012, 02:58 PM
Post
#2
|
|
|
Access Wiki and Forums Moderator Posts: 47,996 From: SoCal, USA |
Hi Shauna,
(IMG:style_emoticons/default/welcome2UA.gif) What version of Access are you using? Please remember to select the version number when posting questions in case it becomes relevant to the discussion. You might be able to use Conditional Formatting to change the color of the controls in the subform. Just my 2 cents... (IMG:style_emoticons/default/2cents.gif) |
|
|
|
Apr 3 2012, 03:02 PM
Post
#3
|
|
|
New Member Posts: 10 |
Hey DBGuy. I am using access 2010, but the DB was created in 2007. Not sure if that makes a difference but wanted to note it. I thought I did choose a version, I thought I selected Office 2010 (my bad if not).
Thanks for your reply. I will try conditional formatting. Thanks |
|
|
|
Apr 3 2012, 03:08 PM
Post
#4
|
|
|
Access Wiki and Forums Moderator Posts: 47,996 From: SoCal, USA |
Hi,
(IMG:style_emoticons/default/yw.gif) You may have selected the version number but just to let you know, there is a bug in the forum software that if you "preview" your post before submitting it, you will have to re-select the version number or it will not show up. Conditional Formatting can change the format of one control at a time. Not sure if 2010 has a new way to change the whole row. If not, you'll have to apply CF to all the columns in your datasheet. Good luck with your project. |
|
|
|
Apr 3 2012, 03:15 PM
Post
#5
|
|
|
UtterAccess Ruler Posts: 1,421 From: Gulf South USA |
Actually you can create a single textbox and slip it under the whole row - and apply the conditional formatting to that box alone. See the demo attached. Note that you are limited to three conditions this way. There is, however, another method (more involved) that will let you choose essentially unlimited colors.
HTH Joe This post has been edited by RJD: Apr 3 2012, 03:17 PM
Attached File(s)
|
|
|
|
Apr 3 2012, 03:26 PM
Post
#6
|
|
|
UtterAccess Veteran Posts: 312 From: Las Cruces, NM |
Very cool... I would have never thought of that.
Please explain the method of allowing more than the 3 conditions... Actually you can create a single textbox and slip it under the whole row - and apply the conditional formatting to that box alone. See the demo attached. Note that you are limited to three conditions this way. There is, however, another method (more involved) that will let you choose essentially unlimited colors. HTH Joe |
|
|
|
Apr 3 2012, 03:48 PM
Post
#7
|
|
|
UtterAccess Ruler Posts: 1,421 From: Gulf South USA |
Hi Brian: Attached is a demo I did in another thread (it's in mdb format) that has more than three colors. It is a bit more complex, as you will see. The underlying line-wide textboxes (there are several, one for each color) are stacked and if the trigger control contents are as wanted for that color, a bunch of block characters are displayed in the chosen color - otherwise a blank is used. A later approach (I can't find it right now) uses the String function to display the blocks instead of the cumbersome long line of blocks - a much better approach.
Pull the stacked textboxes apart to see how this is constructed. Somewhat cumbersome, but allows lots of colors. HTH Joe
Attached File(s)
|
|
|
|
Apr 3 2012, 03:58 PM
Post
#8
|
|
|
Access Wiki and Forums Moderator Posts: 47,996 From: SoCal, USA |
Hi Joe,
I haven't looked at your demo but the OP stated that she's using Datasheet view for the subform. Just want to make sure if your demo works for datasheets too. Also, since 2007 (the OP is using 2010), you can now use more than just 3 conditions in CF (can't remember how many at the moment - 50 comes to my mind). Just my 2 cents... (IMG:style_emoticons/default/2cents.gif) |
|
|
|
Apr 3 2012, 04:04 PM
Post
#9
|
|
|
UtterAccess Ruler Posts: 1,421 From: Gulf South USA |
Hi DBguy: Hmmmm... I just checked my A2007 version and could not get more than 3 conditions listed. Where did I miss something? (The demo I cited/included last was for a A2003 user - but the first demo I included was A2007.) I did not test datasheet view, but will now. I was just throwing out an idea with the demo. But thanks for looking over my shoulder on this...
Joe |
|
|
|
Apr 3 2012, 04:08 PM
Post
#10
|
|
|
Access Wiki and Forums Moderator Posts: 47,996 From: SoCal, USA |
Hmm... I believe I read it somewhere. I can't find the reference right now. If not 2007, definitely 2010, but I can't check right now. Sorry...
Just my 2 cents... (IMG:style_emoticons/default/2cents.gif) |
|
|
|
Apr 3 2012, 04:10 PM
Post
#11
|
|
|
UtterAccess Ruler Posts: 1,421 From: Gulf South USA |
The Datasheet view will show the correct color bar in A2007 (the creation platform for the original post), but includes it as a separate field/control to the right (last in display sequence). If that is satisfactory. But the A2003 mdb does not display properly in Datasheet view, since there are several separate controls and the colors don't seem to want to display. I'll look at A2010 for limits.
This post has been edited by RJD: Apr 3 2012, 04:13 PM |
|
|
|
Apr 3 2012, 04:14 PM
Post
#12
|
|
|
UtterAccess Veteran Posts: 312 From: Las Cruces, NM |
Yes RJD... only 2010 has the ability for many more conditions. I guess that's what he meant when he said "since 2007..."
|
|
|
|
Apr 3 2012, 04:23 PM
Post
#13
|
|
|
UtterAccess Ruler Posts: 1,421 From: Gulf South USA |
I guess so. The original poster said the db was created in A2007, so I took it from there. I just checked A2010, and you and theDBguy are certainly correct (of course). Since the SP1 problems with A2010, I have used A2007 exclusively and had not checked conditional formatting in A2010. I didn't check total number of conditions, but it is certainly much larger than 3. Looks like I'm still on the learning curve for that one! (IMG:style_emoticons/default/thumbup.gif)
Joe |
|
|
|
Apr 3 2012, 04:29 PM
Post
#14
|
|
|
Access Wiki and Forums Moderator Posts: 47,996 From: SoCal, USA |
Hi Joe (and Brian),
This video is the only reference I could find right now and it mentions that you can have up to 50 conditions in Access 2010. Video: Highlight data on forms by using conditional formatting For Access 2007, we're still stuck with the three limit. (IMG:style_emoticons/default/frown.gif) Thanks for testing the demos too. Cheers (IMG:style_emoticons/default/cheers.gif) |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 22nd May 2013 - 02:04 PM |