473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Unselect Listbox Entry?

Hi ,

I have a combobox in my form. If the user select some option from the combobox, it subsequently populate Listboxes (5 in all) on my form. This works fine. the annoying part is that in Listboxes all the populated entries gets highlighted & when ever I print that form all the list boxes have that black color for the populated entries. Is there a way that I cna get rid of this highlighted thing in listbox. Please know that all the listboxes are bound to selection of my combobox. Thanks.

Kashif
form.jpg
Mar 23 '09 #1
4 5807
ADezii
8,834 Expert 8TB
@kashif73
To deselect all selected items in all List Boxes on a Form, try:
Expand|Select|Wrap|Line Numbers
  1. Dim ctl As Control
  2. Dim intCurrentRow As Integer
  3.  
  4. For Each ctl In Me.Controls
  5.   If ctl.ControlType = acListBox Then
  6.     For intCurrentRow = 0 To ctl.ListCount - 1
  7.       ctl.Selected(intCurrentRow) = False
  8.     Next
  9.   End If
  10. Next
Mar 23 '09 #2
Thxs ADezii. It helped :)
Mar 23 '09 #3
ADezii
8,834 Expert 8TB
@kashif73
You are quite welcome, kashif73.
Mar 23 '09 #4
NeoPa
32,556 Expert Mod 16PB
Simple question :
Do you really want your data shown in ListBoxes? It seems that TextBoxes may be more appropriate.

I don't know the whole story of course, so only you can answer that.
Mar 24 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Annette Massie | last post by:
I would like to have a form that lists current addresses being used. On this form I would also like to have a command button that would allow the user to add an address if they do not see it...
3
by: Mike Top | last post by:
I want a listbox to position to a letter provided by the user. Normally, when the user keys a letter, the listbox positions automatically to the first entry starting with that letter in the first...
3
by: Stefan Mueller | last post by:
I've an input box <input type = "text" name = "MyInput" value = ""> and a selection <select name = "MySelection" size = "1"> <option value = "1">Entry 1 <option value = "2">Entry 2 </select>...
1
by: mikev | last post by:
Hi all I have a listbox which is 5 rows high. There are 5 list items. The first one is selected. I wish to click on a button and have the selection focus on the listbox removed. Removed,...
6
by: Mark | last post by:
Hello. I have a listbox whose rowsource is set to a saved query (call it "qry_customer_list.") When I add customers to my database, I call the listbox Requery method so that the listbox will...
1
by: =?Utf-8?B?anVsaW8=?= | last post by:
i have a listbox w/ single select mode. Can a user unselect an item by clicking on it? How is it implemented? Thanks
3
by: Joe Cool | last post by:
I have a ListBox on a form than has some items. The select mode is one item only. I select one, it is selected and hightlighted. I then click somewhere in the listbox not on any item, in the clear...
1
by: mishasoft | last post by:
Hi all, I have a HTML multiple select (ListBox) control: <select id="mySelect" multiple> <option>Apple</option> <option>Orange</option> <option>Pineapple</option> ...
1
by: rbr | last post by:
I have two listboxes on an asp.net web control (ascx). I want them to act non-mutually-exclusive. In other words, if an item in one listbox is selected, I want the other to be clear. The problem...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.