From: Phil on
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 don't think one or other of
Windows 7 or Access 2010 are happy with MSCOMCTL.OCX)

Stephen Lebans has a sample at
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 can't 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