Change Colour of records in combo box depending on value of record...?!?

Marcus H

Registered User.
Local time
Today, 23:23
Joined
Nov 29, 2000
Messages
13
I use a combo box to look up stock records on my form. I may have nearly 300 stock records but prehaps only 100 will be in stock. There is a value on these records called 'CurrentStockLevel'. If CurrentStockLevel is 1 or more i would like its record on the combo box to show in a different colour so i could immediately identify what was in or out of stock by cliking on my combo box. Is this possible and if so how would i go about doing it? Thanks so much for any help this really would be an amazing feature for me to have.
 
On event AfterUpdate of the combo box,
set the backcolor of the combo box based upon your criteria.

me!backcolor@cboBox = ?

A Select Case or If then else work very well.
 
Thank you for your advice but unfortunately i'm not that amazing at this! Can you please elaborate further on your advice so a dumb ass like me can understand!! Thanks a million for the tips.
 
Access doesn't have any place to store this color coding property. The combobox rows have two states - selected (a single row only) or not-selected (all the rest of the rows).
You won't be able to change the color of the various rows. But, you could include the CurrentStockLevel field in the combobox query. That way when you expand the combo, you will be able to see the stock level.
 
If you're using Access 2000, there's a neat item under the "Format"menu called "Conditional Formatting" that will cover quite a lot. It's very "User friendly".
 

Users who are viewing this thread

Back
Top Bottom