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

MS-Access Combo Box To List

Hi Group,

I was trying to link a combo box with a list control and having some
trouble with that. Could anyone please help me with that. Here's the
example of the scenario.

Combo Box ;- Country_Names (Pulls values from the country table(Just
the country_name value))

(Each country will have a table by itself, For Example USA will be a
table and it will have fields like "Area", Population", "States",
"Major Cities", "Males", "Females"...etc." the fields vary from country
to country. USA will have 20 Fields where as Japan will have just 18
fields and UK will have 15 only.)

ListViewCtrl:- (This will display the fields pertaining to every
country. For Example,If I chose USA in the "Country_Name" Combo box
then fields in the USA table needs to be displayed here.

I'm kind of having trouble to link these two controls "Combo Box" and
"ListCtrlView". Could anyone please help me with this. OR is there any
other way to do this? All suggestions are highly appreciated.

Thanks
Arun

May 8 '06 #1
1 1972
On 8 May 2006 12:28:14 -0700, "Arun" <ar***************@gmail.com>
wrote:
Hi Group,

I was trying to link a combo box with a list control and having some
trouble with that. Could anyone please help me with that. Here's the
example of the scenario.

Combo Box ;- Country_Names (Pulls values from the country table(Just
the country_name value))

(Each country will have a table by itself, For Example USA will be a
table and it will have fields like "Area", Population", "States",
"Major Cities", "Males", "Females"...etc." the fields vary from country
to country. USA will have 20 Fields where as Japan will have just 18
fields and UK will have 15 only.)

ListViewCtrl:- (This will display the fields pertaining to every
country. For Example,If I chose USA in the "Country_Name" Combo box
then fields in the USA table needs to be displayed here.

I'm kind of having trouble to link these two controls "Combo Box" and
"ListCtrlView". Could anyone please help me with this. OR is there any
other way to do this? All suggestions are highly appreciated.


Arun,

You need to spend some time familiarizing yourself with the concept of
normalization, as the design you have defined above is not.

An example might be three tables:

tblCountries
============
Country_ID
CountryName
CountryAbbrev

tblStatistics
=============
Statistic_ID
Statistic (eg., "Population")

tblCountryStatistics
=============
fk_CountryID
fk_StatisticID
StatisticValue (eg. 310,000,000)

I note that the type of fields that you are describing are sometimes
numeric (Population) and sometimes can themselves be a list (Major
Cities). Unless you meant them all to be statistics in the sense that
the value associated with Major Cities is the NUMBER of Major Cities.

Assuming you meant the former, you have quite a challenge on your
hands designing a system whereby you can tell the difference between
the two at the right time (is it a list, or a statistic? hmmmmmm)

For now, I've stopped here on the theory that the values are always
statistics. If they aren't, then you need to define the next level
before going on.

Anyway, once you have the table design established, the values for
your countries combo box come from the tblCountries table.

And the values for your list view come from the combination of what
was selected in the combo box and the tblStatistics table.

Once you have both, you can then do what you will with the values from
the tblCountryStatistics.

You can, although I wouldn't recommend it, short circuit this design
by axing the middle table and modifying the third table as follows:

tblCountryStatistics
=============
Statistics_ID
fk_CountryID
StatisticValue (eg. the population)

This will still allow you to build your list view, but it is not as
flexible for further development.

mike

May 8 '06 #2

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

Similar topics

9
by: CY FOK | last post by:
Hi I am planning to open a software company to develop client-server apps and web applications for my client. Now, i am in a difficult situation to determine what is the best platform i should use...
3
by: Christian McArdle | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.os.ms-windows.programmer.64bit This is a formal Request For Discussion (RFD) to create comp.os.ms-windows.programmer.64bit as an unmoderated...
7
by: Joe Ross | last post by:
I've been working with Microsoft support for over 3 weeks now on an intermittent General Network Error we're seeing in our production environment between our ASP.NET application and SQL Server...
2
by: Mikey | last post by:
Sample VB .NET source code to create mailing labels or customized letters using MS Word MailMerge This VB .NET source code will start MS Word and call methods and set properties in MS Word to...
1
by: Ted | last post by:
I managed to get it installed OK, along side MS Visual Studio 2005 (with which I received it). During the install, I made sure I installed everything. I have developed a number of applications...
1
by: Dr T | last post by:
Hi! I downloaded MS Visual Web Developer 2005 Express Edition, MS .NET Framework SDK v2.0, and MS SQL Server 2005. Subsequently, I bought MS Visual Studio 2005 Professional Edition. 1) Are...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.