Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to highlight an entire row or column in a colour

Status
Not open for further replies.

vanti1

Technical User
Apr 11, 2001
6
IE
i want to highlight an entire row or column in a different colour in a datasheet form i can highlight the a cell in any colour but not the row/column any ideas anyone??
p.s. i'm not very technical so be gentle please thanks in advance
mike
 
Welcome to the millions who would like do exactly the same thing. However, it is not possible to do so in datasheet view. Dev Ashish has some examples of possible ways to do so for continuous forms on his website:

Jim Lunde
compugeeks@hotmail.com
Custom Application Development
 
Sure there's a way!

If you don't already have it: Access 2000! Conditionnal Formatting!

For columns:
Select your field in design view, Select Format-Conditionnal Formatting, set a &quot;condition&quot;, be it even an impossible one <-trick ;-) pick a color, and in continuous or datasheet view you will have the results you desire.

For rows, as above, but base all your fields color change on some realistic condition relevant to that unique record. Gord
ghubbell@total.net
 
I don't use 2000 much at all (haven't found much use for it myself), that is a feature I was unaware of, thanks for the tip. Jim Lunde
compugeeks@hotmail.com
Custom Application Development
 
Not at all Jim! :) Not promoting, only taunting you to reconsider 2000 (* or soon XP! ;-) ) : Besides the 4 digit year formatting option, conditionnal formatting, Semi &quot;Speed Ferret&quot; AutoCorrect feature, GUID (globally unique ID numbers)Unicode and 2Gb max size (well, that last one is no real gain 'cause of unicode) not to mention data Access pages! and I'm just starting! I'm actually very surprised to hear of the number of people who still use 97. The first reason for my upgrading? Conditionnal formatting! Client required it and well, it's built in! Gord
ghubbell@total.net
 
I'll back up ol' ghubby on that one. 2000 is cool. All sorts of nice, intuitive features. Burn your 97 and run down to your nearest Microsoft stockist now!

Mr Gates may be a bit of a starfish trooper but he's given us a good 'un with 2000.

Not a fan of the new icons though. Pretty pooey if you ask me.
 
Thanks for the heads-up on conditional formatting! One question though: I have a button on a form that opens a popup form for related information. I would like to make the font color on the button RED if data exists on the popup. It looks like conditional formatting cannot be applied to a button though. Is this true?
 
A little bit of code required:
Something like:

If Not IsNull(Forms![NameOfPopUp]! [NameOfSomeFieldWithDataOnPopUp]) Or Forms![NameOfPopUp]! [NameOfSomeFieldWithDataOnPopUp]= &quot;&quot; Then
Me![NameOfCommand].forecolor = vbred
Else
Me![NameOfCommand].forecolor = vbblack
end if


You'd apply this after the line that says DoCmd.openform...
:) Gord
ghubbell@total.net
 
Gord:

How much time do you actually spend playing with colors?

Thanks for another fine tip. Got me thinking of ways to tweak forms to make them more interesting to users (or at least more interesting for me). Gotta love them bells and whistles.

Now if you could just figure out how to change a command button's back color . . . .


Larry De Laruelle
larry1de@yahoo.com

 
I Like colors. Why &quot;up here things git kin'na grey for a spell&quot;... :) guess that's where it comes from...

Hmmm. Ok. here you go:

Make a label with a caption, its Special Effect &quot;Raised&quot; to start.

Mouse down event:
Me.YourLabel.SpecialEffect = 0

Mouse up event:
Me.lblDateCreation.SpecialEffect = 1

On Click event:
what ever you want it to do, open form...

You can even have it change colors as you go...some of those nice colors! Enjoy Larry! ;-) Gord
ghubbell@total.net
 
Larry, catch that little fix required there in the mouse down too... copy/paste....why's it always gotta be copy/paste... LOL Gord
ghubbell@total.net
 
Gord:

Always a way around.

Thanks. I'll give that a whirl on the morrow.

By the way, in Northern Indiana today it's downright grey also.
Larry De Laruelle
larry1de@yahoo.com

 
Gord,

I like to set the Command Button's Trasparent property to Yes and lay it over a Label. Same result, but you still get to SetFocus and include as a Tab Stop.

BoxHead
 
BoxHead. When are you going to become a member here!! My star giving ability is severely hampered until you are! :) Gord
ghubbell@total.net
 
Gord. Can't use my work e-mail for registration and have yet to set up personal e-mail from home.

I haven't gotten a star since third grade so you know I'll join up as soon as I can.

BoxHead
 
Boxhead! A Hotmail or similar account! They're free! You will need that home email soon 'cause the job doesn't end here at 5pm... Actually, it never ends! :) Gord
ghubbell@total.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top