Solved

Populate a second combo box  menu when choosing criteria in the first combo box(State/City example)

Posted on 2008-10-12
7
222 Views
Last Modified: 2013-11-28
Can somebody give a very simple (3 States  3 Cities) example of how in Access I can make a form that after choosing a State from a combo box (vlook up from State table)   will populate the second combo box with predetermined list of cities  for the State selected?


Thanks in advance for any input.
0
Comment
Question by:Exl04
  • 5
7 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 22698724
see this sample db


2Combobox.mdb
0
 
LVL 1

Author Comment

by:Exl04
ID: 22699076
capricorn1,
Thanks for the sample.
I took the State/City sample as an analogy for my Db because I knew it will be the best way to explain what I needed it. But,
How can I accomplish the same result if I have separate tables for State and Cities?

This is what Im doing; Im creating a very simple database to collect data in a manufacturing process. The unit been build goes trough 3 inspection Station and I need a form to record the particular issues in each stations, this Issues are not the same in each Station. So I got a table for Station 1, 2, and 3, particular Issues , how can I created a form that will have a combo box that will choose the Station number and then after choosing the Station number the next combo box (Issues) drop down menu will populate according to the Station been chosen in Stations combo box?

I need to write this to a new table where I will have al the Stations data to make reports.

I have attached a sample to help understand what Im trying to do

Thanks gain fro the help.

Example.mdb
0
 
LVL 26

Expert Comment

by:dannywareham
ID: 22699089
http://www.mvps.org/access/forms/frm0028.htm

Have your values in two tables (related) and you can use this as an example.
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 1

Author Comment

by:Exl04
ID: 22703662

Dannywareham, thanks for replaying
I must be doing something wrong, or I havent explained correctly what Im trying to accomplish;
 The tables Issues are tables that will be maintain in a weekly bases, Issues are going to be added and subtracted every week, so I need these tables as they are.
 I tried to use the code sample on the link you provided and what the first combo box gives me is the fields names of the table  Stations. Can you apply on the samples to the Example data base I posted?
I need when I choose Station number in combo box 1 populate combox2 with the Issues of station selected in combox1

Thanks
0
 
LVL 1

Author Comment

by:Exl04
ID: 22713215
Can some one tell me if I'm using the right table design to use these tables in a combo box.?

Thanks!
0
 
LVL 1

Author Comment

by:Exl04
ID: 22753710
capricorn1:
   Thanks for the sample
dannywareham:
   Thanks for the link

I will adapt capricorn1 method

IgnBan
0
 
LVL 1

Author Closing Comment

by:Exl04
ID: 31505487
Thanks for let me learn from you!

IgnBan
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question