Highligt something in a listbox

J

JOM

I have a lisbox that whose row source is from from a query. I would like
when someone opens the form that contains the listbox, the urgent things will
be to highlight something that is urgent, how do I do this?
 
F

fredg

I have a lisbox that whose row source is from from a query. I would like
when someone opens the form that contains the listbox, the urgent things will
be to highlight something that is urgent, how do I do this?

You cannot format individual lines in a list box.
If you need something like that, create a small continuous sub-form,
use conditional formatting, and you can highlight as much as you want.
 
A

Arvin Meyer [MVP]

If the values are unique and you specify the value of the bound field in
code, it will highlight that row. This only works on unbound listboxes, when
the multi-select property is set to None.

Sub Form_Current()
Me.lstListBox = 3
End Sub

You can use a multi-select when the list box is bound to field in the
underlying query, but then you must open to the specific record that
contains the values that you want to display.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Top