Listbox - Select only one record

gsrajan

Registered User.
Local time
Today, 18:32
Joined
Apr 22, 2014
Messages
227
I have a list box bound to a query. If the list box retrieves two records, I am not able to select only one of them. If I click, it gets both records selected ( highlighted ). Is there any way I can select only one record?

Thank you.
 
What do you have checked under Other Multi-Select ? I generally use Simple. Depends on your needs.

HTH
 
I tried none, simple, multi - but all of them select both records - since both records have same values.
 
Sorry, this makes no sense to me. Anyway you upload a Demo copy?
 
Thank you. I do not have the permission for that; I have a txtSearch, a srListbox and rsltForm. I enter the Employee id in the txtSearch and click cmdSearch. The srListbox displays the result. When I click srListbox, that is set as the recordsouce for the rsltForm.

If the search result displays two records with the same eployeeid in the srListbox and if I click any one of them, the both records get highlighted (selected). So I am not able to set the recordsource for the form.

As you said, I changed the listbox property to none or simple or multi, yet when I click the list box, both records get selected.

Thanks again trying to help me. If it is not possible, I will replace the listbox with a subform.
 
I think I see the problem, you are filtering the Listbox with a search. If you do not click search, does the Listbox display all of the employees?
 
Thank you. No, this listbox is unbound until the cmdSearch is clicked.

Thanks again.
 
The main problem is your filter. Not sure of your criteria for the filter?. Normally the ListBox is bound and then you filter as needed. This would be my suggestion.
 

Users who are viewing this thread

Back
Top Bottom