Marcus H
03-13-2001, 06:08 AM
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.
llkhoutx
03-13-2001, 09:37 AM
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.
Marcus H
03-13-2001, 11:33 AM
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.
Pat Hartman
03-13-2001, 05:06 PM
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.
zunan
03-16-2001, 06:36 PM
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".