Disable ListBox Items

T

tsluu

Is it possible to disable listbox items so that users can see what are
available but unable to select the disabled items.

Purpose is for Inactive items in the table where only the administrator can
disable/enable it whereas users can just view but not select the disabled
item.
 
A

Arvin Meyer MVP

Not possible. It's all or none. What I suggest is a checkbox next to the
listbox which changes the rowsource to show one or the other.
 
D

Dirk Goldgar

Arvin Meyer MVP said:
Not possible. It's all or none. What I suggest is a checkbox next to the
listbox which changes the rowsource to show one or the other.


While I agree with your recommendation, Arvin, wouldn't it be possible to
include active/inactive status as a column in the list box, and have code in
the control's AfterUpdate event to de-select any inactive items that might
have been selected?
 
A

Arvin Meyer MVP

Dirk Goldgar said:
While I agree with your recommendation, Arvin, wouldn't it be possible to
include active/inactive status as a column in the list box, and have code
in the control's AfterUpdate event to de-select any inactive items that
might have been selected?

Of course that would work, but wouldn't you worry about the user thinking it
was OK to select the inactive items?
 
D

Dirk Goldgar

Arvin Meyer MVP said:
Of course that would work, but wouldn't you worry about the user thinking
it was OK to select the inactive items?


A bit. I would want a visible column of the list box to say "**INACTIVE**",
or something like that, and maybe if they tried to select it I would display
a message that this is an inactive value and can't be selected.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top