Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-10-12
7
Medium Priority
?
245 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 2000 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
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 specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

916 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