Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Conditional formatting in listbox items in MS Access

Posted on 2011-02-14
12
Medium Priority
?
1,029 Views
Last Modified: 2012-05-11
In the attached Access application, reference the form frmPatient. There is a listbox in the bottom right called lstUnprintedRecs. As you are adding new patients (whose records have not been printed), they are populated in the listbox. The purpose of the listbox is to allow the user to quickly reference all unprinted records (patients) by clicking on the list item & navigating to that particular record. Once item is printed, it is deleted from that listbox. All that works.

I would like to be able to color code (to indicate criticality) the listed items in the listbox as I add them. For e.g, when I add a new record (patient), I should be able to specify criticality of patient by selecting either Red, Blue, Green (via another combox box or radio buttons). Hence, when the patient name appears in the listbox as a listed item, it has the background of the specific color? As different patients/records/items are added, each listed item should have the background color specified for it. I doubt this is possible, but thought I'd ask.

0
Comment
Question by:datasolutionz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +1
12 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 500 total points
ID: 34894404
AFAIK ... this is the only (pricey) 3rd party product that will do that:

http://www.dbi-tech.com/ComponentPage_ctList.aspx

The good news is ... you about 50 some controls for the price.

Your other option is to use a datasheet subform instead of list box (make it look like a list box) ... and then apply Conditional Formatting to do this.

mx
0
 
LVL 85
ID: 34895580
Lebans has some stuff that might be useful, but IIRC the colored listbox was never fully complete (and Stepen doesn't do this anymore):

http://www.lebans.com/List_Combo.htm

That said, the suggestion by MX is probably your best bet, and the easiest to implement and maintain throughout Access versions.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 75
ID: 34898640
Not sure why the db is attached ?

mx
0
 
LVL 85
ID: 34900008
<Not sure why the db is attached ?>

I believe it's because the author wrote "In the attached Access application" and then forgot to attach it.
0
 

Author Comment

by:datasolutionz
ID: 34943783
I have implemented a subForm to achieve what I needed. Thanks for everyone's attention
0
 
LVL 85
ID: 34943805
The it would seem you'd accept Databasemx's comment here:

http:#a34894404

Where he wrote:

"Your other option is to use a datasheet subform instead of list box "

Which is EXACTLY what you did.
0
 
LVL 75
ID: 34944858
I object to any deletion, as noted by LSMConsulting ...

mx
0
 
LVL 75
ID: 34944862
opps wrong button
0
 

Expert Comment

by:_alias99
ID: 34995573
All,
 
Following an 'Objection' by DatabaseMX (at http://www.experts-exchange.com/Q_26836706.html) to the intended closure of this question, it has been reviewed by at least one Moderator and is being closed as recommended by the Experts.
 
At this point I am going to re-start the auto-close procedure.
 
Thank you,
 
_alias99
Community Support Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
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 …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

636 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