473,834 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hw to deselect item selected in the list box

Hello friends
Can anyone tell me how to deselect the item selected in the list box

If Me!lb_test_prop erty.ItemsSelec ted.Count > 0 Then
For Each varItem In Me!lb_test_prop erty.ItemsSelec ted
Me!lb_test_prop erty.ItemsSelec ted = ########
Next varItem
End If
i want to know the code for the ### marked area
Thanks in advance
Takecare
Love
Amit

Mar 24 '06 #1
1 6534
> If Me!lb_test_prop erty.ItemsSelec ted.Count > 0 Then
For Each varItem In Me!lb_test_prop erty.ItemsSelec ted Me!lb_test_prop erty.Selected(v arItem) = False Next varItem
End If
This will work as long as the selected row hasn't been removed yet. It is
possible to remove a row (or one above it, causing the selected row to move
up) that has been selected and the selection bar will remain, but you can't
get to it because there aren't enough items left in the listbox.

--
Wayne Morgan
MS Access MVP
"dev.amit" <ag************ ***@gmail.com> wrote in message
news:11******** *************@v 46g2000cwv.goog legroups.com... Hello friends
Can anyone tell me how to deselect the item selected in the list box

If Me!lb_test_prop erty.ItemsSelec ted.Count > 0 Then
For Each varItem In Me!lb_test_prop erty.ItemsSelec ted
Me!lb_test_prop erty.ItemsSelec ted = ########
Next varItem
End If
i want to know the code for the ### marked area
Thanks in advance
Takecare
Love
Amit

Mar 24 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3878
by: Orchid | last post by:
I have 2 fields with Radio button Data Type, and both fields with more than one options. On Field1, I want the user to select option1, then Field2 is shown and able to select. If the user selects Option2, then Field2 is not shown. I can have the hidden-field working properly. However, after the user selected Field1-Option1 and selected an Option on Field2, but cannot deselect the option on Field2 if change mind on Field1 selection. ...
2
9603
by: VR | last post by:
I have a form with a list view control, a button control and a main menu with menuDelete item. Any time I am handling a button click event or menuDelete click event I call DeleteItem() function which removes the selected item from the list. If I right-click on my list, I clone menuDelete item and display a pop-up menu. So, if user selects Delete item in the menu, I go through the same logic and remove the selected item.
1
5432
by: Christian Dokman | last post by:
Hello, When I bind a datasource to a combobox, the first item is always selected, also when I set the SelectedValue property to -1 or 0. Also when I call the form's bindingcontext.AddNew, the combobox is not always showing an empty value. Does anyone know how to deselect all items in a combobox in a way that always works fine?
4
7155
by: GJP | last post by:
Hello. I have two list boxes. One with a picture name, and one for the ID of that picture (both coming from a database). The user selects the name of the picture and presses a button, the picture and the picture ID are then moved to other list boxes. This works ok, but once this has been done, i dont want to delete the item from the origional listbox, i just want to deselect it, but i cant seem to do this.
4
2361
by: Bill Nguyen | last post by:
I would like to be able to do the following: Listbox1/Textbox1 contains list of all items not selected item A item B item D Listbox2//Textbox2 contains list of all items selected
7
13640
by: deepagulati | last post by:
Hi, I need an urgent help from you. When we dynamically genrate any list box (Select Box) it shows one default value as selected. Is there any way that we can deselect that value. I tried with document.form_Name.ListBox_Name.options.selected =
2
11423
by: ahmad | last post by:
when i used the statment for(var i = 0; i < menu.length; i++) { menu.options.selected = "false"; } to deselect all the options within a list, it surprisingly selected all the options. I tried another option like menu.options.removeAttribute("selected");
1
4607
by: Bailu | last post by:
Hi, I am a newbie in wxPython and doing a program with ListBox, I want to select and deselect items in this box, I have use self.devlist = wx.ListBox(self, style=wx.LB_MULTIPLE) self.Bind(wx.EVT_LISTBOX, self.select_dev, self.devlist) to create this box, but don't know how to implement self.select_dev
0
10789
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10504
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10544
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10214
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9327
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5790
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4425
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3079
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.