List boxes - null selection

emalrola

New member
Local time
Today, 12:32
Joined
Jan 27, 2004
Messages
6
I'm sure this is obvious, but I don't have the experience and can't find any examples in the foruums/online help. So, apologies in advance for such a trivial question!

I have various list boxes on my form which populate optional (unbound) controls. Once the user has selected one, if they then change their mind, how do they 'unselect' to null?

I have played around with redefining my lists multi-select to 'simple' but then they can select more than one. Is there an easy way of implementing 'select one or none'?

Many thanks
 
Is there an easy way of implementing 'select one or none'?
Have you not tried settings the Multiselect property to "None" ?

For a single-select list box, just set the control to Null to erase a previously selected value.
 
I have it set to none and then when the user runs the form, he seems to be unable to deselect once he has selected.

How does the user select 'no value'?
 
The user should be able to just delete the text in the field. The user can highlight the entire text and hit the delete button, position the cursor to the right of the last character and backspace to erase all the letters or position the cursor in front of the text and keep hitting delete button.


If you keep having problems, set up an event to set the field to null by using code.

1. have a button that when clicked executes me.listbox = null. You would have to have a button for each box or

2. use the double-click event for the field that executes me.listbox = null. In this case, just document on the form for the user "To clear a listbox, double-click the field. This event will need to be set up for every list box.
 
Last edited:
Thanks.

The delete doesn't seem to work.

Have decided to write a function to call on-click which tests if the clicked value is already selected and if so, to clear the selection. This seems most consistent with the user-interface (ie; how simple and extended multi-select work)

Just wanted to check I wasn't re-inventing the wheel before I started coding!

Thanks again
 

Users who are viewing this thread

Back
Top Bottom