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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional formatting in list view

Status
Not open for further replies.

conneticat

Programmer
Jul 16, 2004
47
US
thread702-838396

OK, it took me three years to answer this one. Just kidding...I was looking for an answer to this question, and came up with a simpleton answer. Create two or three or fifty unbound text boxes all the same size, make the text for each one a different color and the background transparent, and layer them exactly one on top of the other. Write nifty little iif statements for each one, like =IIf(([Priority]="RED"),[YourField],Null) for the textbox formatted red, and =IIf(([Priority]="GREEN"),[YourField],Null) for the textbox formatted green, and...etc. etc. you get the point. If the conditions are unique, only one of the textboxes will show up, and it will magically be the color you want! If you're really creative, you can even format the text itself with strange fonts like "animals" and have little pictures appear .
 
interesting, butr what do you do when hte listbox.listcount can vary? placing textboxes where there MIGHT be a list box entry seems to almost defeat the purpose of the list box (using the scroll capability to limit the real estate used for the lists).





MichaelRed


 
Heading says "ListView" and you(at least michaelred) talking about "listbox". who is correct?

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
Oops...I was actually responding to a different question than the one I referenced, which I can't find now. It concerned showing different text colors for records when the form is in continuous view. When you run any kind of event procedure, of course, all the records change depending on which one is active, creating a nifty light show effect if you move around fast. My answer was a hacky work around that sort of mimics visible=true or false type coding, if ya know what I mean.

cat2.gif
 
A continues form?!

You might be knowing the conditional formatting available in Access2000+

I have never tried but see

or if it is a ListView then see faq702-6027.

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
Nope, I mean continuous view(all the records one after another) in a form or subform. Conditional formatting won't work...all your records will changes color as you navigate through. That's why individual fields formatted differently, and stacked on top of each other...and appearing and disappearing depending on the data...works for each record individually, even when viewed together in "continuous view'. Just a hacky workaround.

cat2.gif
 
Seen long ago in an app done by a 'reformed' FoxPro programmer working in VBA. Felt revulsion then ... and now. Refer back to ZmrAbdulla's reference. Conditional formatting D OI E S work, althouogh it takes some getting used to and is WAY better when set up programatically (at least for me), when doing many possible formats.




MichaelRed


 
OK, once again...CONTINUOUS VIEW IN A FORM OR SUBFORM . I'm not talking about lists of any sort...please read all the posts above and you'll see I corrected myself. Any procedures applied to the form will make all the records you are viewing change at the same time to the same formatting...including using the cutesy conditional formatting wizard. I take it back...this is not a hacky workaround, it's a clever workaround that you wish you thought of first! So there!

cat2.gif
 
conneticat said:
" ... CONTINUOUS VIEW IN A FORM OR SUBFORM ... ]

Ok, once again

ZmrAbdulla said:
" ... You might be knowing the conditional formatting available in Access2000+
... "

It actually D E S work with continuious forms.





MichaelRed


 
Conditional formatting is limited to three scenarios!

cat.gif
 
hmmmmmmmmmmmmmmmmm ... does this imply that in only sis months you have actually decided that thermight just be some small merit in the CONTINUIOUS references to conditional formatting?

If so, consider the possability of using the expression function. Again, it is far from the most generic tool available, but it IS a significant improvement over nothing. While it is true thaqt there are ONLY three seperate conmditionals, AND it is true that only one condition can be evaluated as "True", there are some possabilities of both font color and background color for each?



MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top