View Full Version : Changing the colour of items in a combo box


Marcus H
03-08-2001, 11:45 AM
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.

llkhoutx
03-08-2001, 11:54 AM
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.