Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable some of the LIST BOX'S values

Status
Not open for further replies.

sabavno

Programmer
Jul 25, 2002
381
CA
Hi

I want to disable some of the list box's values based upon the condition.

Is that dueable in Access?

Thanks
 
It all depends on what the values are and what the conditions are. Most programmers would tell you that anything is possible for the price.

You can set the Source of the List Box when the "Form_Load"
event takes place, or some other event takes place, to various conditions either using a "Case Select" Statement or a set of "if .... then else" clauses.

I would need more information, to be of more help to you.
 
Another thought is that the values of the listbox would need
to be limited by the conditions you set.

Is the listbox based on a set of values, or a table or query?

What are the conditions that would disable certain values?

What are those values that you want to disable?
 
You can change the columnwidths property of the listbox based on a value. The ColumnWidths below show that 7 columns are present in the control but only the first is displayed. Putting the property string together can be somewhat tricky though. Those columns that are hidden can still be referenced.

ListBox.Columns(2).Value

2";0";0";0";0";0";0"
----------------------
scking@arinc.com
Life is filled with lessons.
We are responsible for the
results of the quizzes.
-----------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top