Changing the colour of items in a combo box

Marcus H

Registered User.
Local time
Today, 16:49
Joined
Nov 29, 2000
Messages
13
I have a combo box that looks up tyre records on my field. So if i select Tyre A from the combo box Tyre A's prices and stock levels come up. However it would be really useful if on selecting the tyre from the combo box it would be in a differnt colour if that tyre was in stock. So for any tyres with a stock level of 1 or more would prehaps be red instead of the usual black. Is there any way of implenting this? Would something have to be changed in its source query? Thanks in advance for any tips.
 
if cboTyre is the name of your combo box,

On Form_Open
cboTyre.backcolor = (specifiy the number or global variable name of the color)

on cboTyre_AfterUpdate
cboYyre.backcolor = (specifiy the number or global variable name of the color) -- based on record count of your invetory for that Tyre.
 

Users who are viewing this thread

Back
Top Bottom