473,503 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

two listboxes, 1 selection

50 New Member
hi there, i have two listboxes on a form, what i am wanting to do is when an item is selected in listbox1 then nothing is selected in listbox2, and vice versa, any ideas?

thanks
Apr 7 '08 #1
2 911
kadghar
1,295 Recognized Expert Top Contributor
hi there, i have two listboxes on a form, what i am wanting to do is when an item is selected in listbox1 then nothing is selected in listbox2, and vice versa, any ideas?

thanks
sure, write something like this in the Change event of list box 1

Expand|Select|Wrap|Line Numbers
  1. listbox2.listindex = -1
and vice versa

HTH

Note: results may change in other VB versions, but this should work for most of them.
Apr 7 '08 #2
jarremw
50 New Member
sure, write something like this in the Change event of list box 1

Expand|Select|Wrap|Line Numbers
  1. listbox2.listindex = -1
and vice versa

HTH

Note: results may change in other VB versions, but this should work for most of them.
haha i feel kinda dumb now, didnt think it would be this easy! haha thanks!
Apr 8 '08 #3

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

Similar topics

0
1373
by: Jeffrey Barish | last post by:
I have an application that produces two listboxes. I would like to be able to select one of the items in the first listbox and one of the items in the second listbox. However, when I make my...
3
1695
by: Simon Templar | last post by:
I need the following functionality: With 2 listboxes populated from a database with the SAME data, I need any of the listboxes to stop displaying the option when selected at the other listbox. Eg:...
6
4610
by: Ralph2 | last post by:
Some time ago with a lot of help from this group I made a reasonably successful database to keep track of our shop drawings. However the searching mechanism is too complicated for the occasional...
9
4930
by: Susan Bricker | last post by:
Hi. I have two questions ... (1) I want to use a Listbox to enable the user to select 1 or many items from the list. However, I'm having trouble figuring out how to find out t which items have...
0
1138
by: deejayquai | last post by:
Hi I'm moving forward with a topic I've posted a couple of time before but still haven't cracked it, any further help is much appreciated. In a nutshell, I want to append either 1 or a selection...
4
1905
by: bill yeager | last post by:
I have several template columns inside of a datagrid. Inside of these template columns are databound listboxes: <asp:TemplateColumn HeaderText="Crew Chiefs"> <ItemTemplate> <asp:listbox...
4
2552
by: Full NameEntry | last post by:
Hi all, I'm new to csharp... learning it by muddling my way though examples. In my current example, I'm trying to make a form with a bunch of listboxes that have drag and drop enabled amongst...
0
1173
by: annivanova | last post by:
Hi, I saw posts in Dependent listboxes on access forms, which problem is very similar to my. I’m from Bulgaria and working over to create an MS Access application. I used in my project given code...
3
2292
by: rahulnag22 | last post by:
I will give a simplified example of the problem at hand -- I have a case in which I have two listboxes - listbox1 and listbox2, if I click on an item in listbox1 the item gets highlighted as...
3
5038
JodiPhillips
by: JodiPhillips | last post by:
Hello everyone, there are many questions and answers relating to moving items between two listboxes here and on the net in general, however, none answer my specific problem. I have two listboxes...
0
7203
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
7282
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
7339
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...
0
7463
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
5581
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,...
1
5017
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...
0
3157
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1515
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 ...
1
738
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.