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 can I get more than 3 conditional formats in datasheet view. 1

Status
Not open for further replies.

walcder

Technical User
Jan 9, 2008
8
AU
I am trying to fix a database and one of the screen shots we use is a datasheet view of the data/table sorted in a particular order.

three of the fields are a numerical value which has a value between 1 and 7. This is used in 5 categories.

1 - Wal- (White)
2 - Andrew - (Amber)
3 - Lee - (Yellow)
4 - Chirs - (Blue)
5 - Dave (Green)
6 - Erica - (Pink)
7 - Rachel (Red)

what we want to do is when in the datasheet view use conditional formatting to colour code the field on each record so that you can look at the datasheet view and visually see owner / user of the record.

Access Conditional formatting only gives you 3 choices. Would like to do it in Access VB code if possible.

Any help would be appreciated.
 
Hi walcder,

As far as I know, the only way to colour records in datasheet view is using conditional formatting and unfortunately as you said there are only 3 conditions allowed. Also, you cant use code for conditional formatting in vba instead of from the Format toolbar as this to only allows 3 different conditions. You can use the backcolor property when in form view though to produce more than 3 colours on a text box say, but from what you said you want to show your info in datasheet view.

Andrew
 
Thanks.

yes we have the forms set up and working a treat it was just the datasheet view I couldnt get going.

Do you know the required code for the VBA configuration, maybe I can modify it and see if I can get more than 3 options.

 
Hi,

I had a thread asking about this and have the code on there, click on the link below to find the code:

thread702-1432544

Andrew
 
Thanks for that. I'll have a go over the next few days and see how I go. If i success I'll post it for you and others who may want to do this.

 



"...it tends to suggest you can do more then 3 conditions on there:"

Sure! If you PROGRAM it yourself, via VBA. You could do as maany as you like.

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top