473,385 Members | 1,720 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,385 software developers and data experts.

Linked Listboxs

Hi,

I want to have two Listboxes side by side in a windows form.

Listbox1 will have a list of Programs
I want Listbox2 to show a list of all projects belonging to the selected
program and for listbox2 to update when each program is selected in
Listbox1.

Visual Basic Professional 2005

I've tried help, but help seems worse than ever. I've tried 7 or 8 different
searches and I get 500+ results on anything but listboxes and what's in the
first page of results is for VB 2003 or earlier!@#@!

Help much appreciated
--

Rod Gill
Dec 14 '05 #1
4 1131
I have bound the list boxes to the data in SQL Server, I just need to link
the two boxes so the second only shows data related to the first.

--

Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
"Rod Gill" <rod AT project-systems DOT co DOT nz> wrote in message
news:eP**************@tk2msftngp13.phx.gbl...
Hi,

I want to have two Listboxes side by side in a windows form.

Listbox1 will have a list of Programs
I want Listbox2 to show a list of all projects belonging to the selected
program and for listbox2 to update when each program is selected in
Listbox1.

Visual Basic Professional 2005

I've tried help, but help seems worse than ever. I've tried 7 or 8
different searches and I get 500+ results on anything but listboxes and
what's in the first page of results is for VB 2003 or earlier!@#@!

Help much appreciated
--

Rod Gill

Dec 14 '05 #2
Edit the binding source properties to add a Filter. Programmatically modify
the filter whenever the first listbox selected value changes. Seems to work
a treat.
I have bound the list boxes to the data in SQL Server, I just need to link
the two boxes so the second only shows data related to the first.

--

Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
"Rod Gill" <rod AT project-systems DOT co DOT nz> wrote in message
news:eP**************@tk2msftngp13.phx.gbl...
Hi,

I want to have two Listboxes side by side in a windows form.

Listbox1 will have a list of Programs
I want Listbox2 to show a list of all projects belonging to the selected
program and for listbox2 to update when each program is selected in
Listbox1.

Visual Basic Professional 2005

I've tried help, but help seems worse than ever. I've tried 7 or 8
different searches and I get 500+ results on anything but listboxes and
what's in the first page of results is for VB 2003 or earlier!@#@!

Help much appreciated
--

Rod Gill


Dec 14 '05 #3
How are you going to retrieve the information? Database, folder/file reader?
Are you hard coding the program list? Xml?

At some point your going to have to write some code and build a framework
for your data and then decide how to store and retrieve it.

Here's a tip to get you started. You could index your programs list in the
data column and then use this to retrieve the set of projects to fill in your
second list box. Such as "Funny Code", "FC" or just "1" then however your
saving your project data have the index as part of it so that it identifies
itself with your program.

Randy
"Rod Gill" wrote:
Hi,

I want to have two Listboxes side by side in a windows form.

Listbox1 will have a list of Programs
I want Listbox2 to show a list of all projects belonging to the selected
program and for listbox2 to update when each program is selected in
Listbox1.

Visual Basic Professional 2005

I've tried help, but help seems worse than ever. I've tried 7 or 8 different
searches and I get 500+ results on anything but listboxes and what's in the
first page of results is for VB 2003 or earlier!@#@!

Help much appreciated
--

Rod Gill

Dec 15 '05 #4
Hi,

I've bound the controls to respective related tables and they display data
as expected. I just need to limit what's in the second listbox to the
selected, related master record in the first ListBox.

I've done it now by using a Filter on the binding source object

Thanks.

--

Rod Gill
"Randy Cragin" <Ra*********@discussions.microsoft.com> wrote in message
news:AD**********************************@microsof t.com...
How are you going to retrieve the information? Database, folder/file
reader?
Are you hard coding the program list? Xml?

At some point your going to have to write some code and build a framework
for your data and then decide how to store and retrieve it.

Here's a tip to get you started. You could index your programs list in the
data column and then use this to retrieve the set of projects to fill in
your
second list box. Such as "Funny Code", "FC" or just "1" then however your
saving your project data have the index as part of it so that it
identifies
itself with your program.

Randy
"Rod Gill" wrote:
Hi,

I want to have two Listboxes side by side in a windows form.

Listbox1 will have a list of Programs
I want Listbox2 to show a list of all projects belonging to the selected
program and for listbox2 to update when each program is selected in
Listbox1.

Visual Basic Professional 2005

I've tried help, but help seems worse than ever. I've tried 7 or 8
different
searches and I get 500+ results on anything but listboxes and what's in
the
first page of results is for VB 2003 or earlier!@#@!

Help much appreciated
--

Rod Gill

Dec 15 '05 #5

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

Similar topics

7
by: Chris Ritchey | last post by:
Hmmm I might scare people away from this one just by the title, or draw people in with a chalange :) I'm writting this program in c++, however I'm using char* instead of the string class, I am...
6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
5
by: Dream Catcher | last post by:
1. I don't know once the node is located, how to return that node. Should I return pointer to that node or should I return the struct of that node. 2. Also how to do the fn call in main for that...
4
by: Neil Ginsberg | last post by:
I have ODBC linked tables to a SQL 7 database in an A2K database. The linked tables do not have the password stored in them, so the first time the user accesses them, they need to enter the SQL...
2
by: Jill Elaine | last post by:
I am building an Access 2002 frontend with linked tables to an encrypted Paradox 7 database. When I first create these linked tables, I'm asked for the password to the encrypted Paradox database,...
10
by: Kent | last post by:
Hi! I want to store data (of enemys in a game) as a linked list, each node will look something like the following: struct node { double x,y; // x and y position coordinates struct enemy...
6
by: Steve Lambert | last post by:
Hi, I've knocked up a number of small routines to create and manipulate a linked list of any structure. If anyone could take a look at this code and give me their opinion and details of any...
1
by: Redbeard | last post by:
I am a newbie running Access 2003. A couple of weeks back a member named ADezil help me write a code that let a , MultiSelect Listboxs that run a Query on a Form (many thanks). I have used this...
0
by: Atos | last post by:
SINGLE-LINKED LIST Let's start with the simplest kind of linked list : the single-linked list which only has one link per node. That node except from the data it contains, which might be...
7
by: QiongZ | last post by:
Hi, I just recently started studying C++ and basically copied an example in the textbook into VS2008, but it doesn't compile. I tried to modify the code by eliminating all the templates then it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.