Solved

Conditional formatting list box/query

Posted on 2003-11-05
5
211 Views
Last Modified: 2012-06-22
I have an unbound list box on a form that is populated by a
query.  The query returns records of information about
healthcare facilities; each record is a facility name (and
key) and a set of four dates representing essentially the
last updates of different sets of facility related data.
Users select a facility in the list box and from there
navigate to related forms for the selected facility.  

I want to apply conditional formatting to these dates, such
that they appear red when a certain time threshold is
exceeded.  On a similar report, for example, I apply
conditional formatting using the Datediff function, but
this is easy on a form.  It seems that to do it in the list
box I have to apply formatting somehow within the sql of
the query that populates it.  Is it possible to embed
conditional logic (and the datediff function) in a jet sql
query?  Or am I going to have to redesign the way the list
box is populated with a vba procedure that would allow me
greater control over fields?  

Thanks in advance,

J.D.
Novice access developer
0
Comment
Question by:calcutec
  • 2
5 Comments
 
LVL 4

Expert Comment

by:ki_ki
ID: 9688850
Hi calcutec,
Sometime ago I posted a list/box question. Somoene suggested the link below. I never really had time to check it out. Let me know if it worked for you:
http://www.lebans.com/listboxenhanced.htm
0
 

Author Comment

by:calcutec
ID: 9690240
Thanks ki_ki,

That is a little more code than I have time to sift through right now, especially in a language I don't really know.  But it does show that at least some custom formatting is possible in a list box.  Looks like it manipulates entire rows, not fields, which is what I need.

Another group offered the solution of using sql to append an asterisk to overdue dates, which looks at this point like what I'll have to do.

Thanks again.
0
 
LVL 4

Accepted Solution

by:
ki_ki earned 50 total points
ID: 9690635
As i said, I don't have time either to look at it. But the asterix trick is a goog idea.
0
 
LVL 32

Expert Comment

by:jadedata
ID: 10022623
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: ki_ki {http:#9688850}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jadedata
EE Cleanup Volunteer
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now