Access 2010
(1)
Windows 7
(1)
LisView
(1)
Listbox
(1)
Stepen
(1)
Lebans
(1)
Hwnd
(1)
OCX
(1)

AK2 Listbox different coloured lines

Asked By Phil
20-Mar-10 12:40 AM
I am trying to colour each line on a listbox differently, depending on one of
the fields in the listbox. Because I will be migrating to Access 2010 when it
is released, I cannot use the LisView control (I do not think one or other of
Windows 7 or Access 2010 are happy with MSCOMCTL.OCX)

Stephen Lebans has a sample at http://www.lebans.com/listboxenhanced.htm
which should give me a starting point ... but if I open the form in design
view then go to form view it works perfectly. If I try to open the form
directly in form view I get a do loop that never exits. It may be something
to do with getting the hwnd of the form, but I cannot make out what the
problem is.

Can anybody please put me on the right track either with a different approach
(bit reluctant to use an OCX in case of incompatibility problems) or see what
Stepen has got wrong

Many thanks

Phil
Post Question To EggHeadCafe