473,786 Members | 2,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dropdown --> Dropdown --> Dropdown

Ok, I am pretty new to Access (Using Access 2002 at my job). Here is
what I want to do.

I want to create a database that has a form. On this form will be a
dropdown menu (combobox). Depending on what you select in the first
drop down box, another dropdown box will be populated with specific
info based upon what was selected in the first box.

For example:
The first drop down box has "Breakfast" "Lunch" and "Dinner" as a
choice.
The user would select "Breakfast" and then the 2nd dropdown box has
"Eggs" "Sausage" "Pancakes" -
The user selects Eggs, and they can then choose Over Easy, Sunny Side
Up, etc.

I am actually using the DB for bank routing numbers and things like
that, but to make it easy I choose food choices for my example.

Now, I have a table with the "Breakfast Lunch Dinner", and a combobox
will let you see that list and choose which 'meal' you want. I also
have all of the other tables setup with all of the food options and
whatnot.

My question is, how do I get a 2nd dropdown box to populate based upon
what is selected in the first one? Is that even possible? Is there
another way to go about this?

Any help would be appreciated.

Thanks.
Ed

Oct 5 '06 #1
4 2655
Greetinx!

Sure, no problem to do that.

Just add the data-string to the next combobox to the "AfterUpdat e"-Code of
the previous one.

To stay with your example:

Private Sub ComboboxMeal_Af terUpdate()
If Me.ComboboxMeal = "Breakfast" Then
Me.ComboboxWhat sOnTable.RowSou rce = "Eggs";"Sausage ";"Pancakes "
Elseif Me.ComboboxMeal = "Lunch" Then
[...]
End If
End Sub

And so on you go with your cascading comboboxes. :-)

Just make sure that you set the "Row" (I'm not sure if that's what it's
called) NOT to "Query/Table".

Regards

Michael

"AccessRook ie" <ed*****@gmail. comschrieb im Newsbeitrag
news:11******** **************@ i3g2000cwc.goog legroups.com...
Ok, I am pretty new to Access (Using Access 2002 at my job). Here is
what I want to do.

I want to create a database that has a form. On this form will be a
dropdown menu (combobox). Depending on what you select in the first
drop down box, another dropdown box will be populated with specific
info based upon what was selected in the first box.

For example:
The first drop down box has "Breakfast" "Lunch" and "Dinner" as a
choice.
The user would select "Breakfast" and then the 2nd dropdown box has
"Eggs" "Sausage" "Pancakes" -
The user selects Eggs, and they can then choose Over Easy, Sunny Side
Up, etc.

I am actually using the DB for bank routing numbers and things like
that, but to make it easy I choose food choices for my example.

Now, I have a table with the "Breakfast Lunch Dinner", and a combobox
will let you see that list and choose which 'meal' you want. I also
have all of the other tables setup with all of the food options and
whatnot.

My question is, how do I get a 2nd dropdown box to populate based upon
what is selected in the first one? Is that even possible? Is there
another way to go about this?

Any help would be appreciated.

Thanks.
Ed

Oct 5 '06 #2
Thank you for the info - I will give it a shot. As I said I am pretty
much a novice in Access so I probably will be here a lot :)

Have a good day

Michael Theymann wrote:
Greetinx!

Sure, no problem to do that.

Just add the data-string to the next combobox to the "AfterUpdat e"-Code of
the previous one.

To stay with your example:

Private Sub ComboboxMeal_Af terUpdate()
If Me.ComboboxMeal = "Breakfast" Then
Me.ComboboxWhat sOnTable.RowSou rce = "Eggs";"Sausage ";"Pancakes "
Elseif Me.ComboboxMeal = "Lunch" Then
[...]
End If
End Sub

And so on you go with your cascading comboboxes. :-)

Just make sure that you set the "Row" (I'm not sure if that's what it's
called) NOT to "Query/Table".

Regards

Michael

"AccessRook ie" <ed*****@gmail. comschrieb im Newsbeitrag
news:11******** **************@ i3g2000cwc.goog legroups.com...
Ok, I am pretty new to Access (Using Access 2002 at my job). Here is
what I want to do.

I want to create a database that has a form. On this form will be a
dropdown menu (combobox). Depending on what you select in the first
drop down box, another dropdown box will be populated with specific
info based upon what was selected in the first box.

For example:
The first drop down box has "Breakfast" "Lunch" and "Dinner" as a
choice.
The user would select "Breakfast" and then the 2nd dropdown box has
"Eggs" "Sausage" "Pancakes" -
The user selects Eggs, and they can then choose Over Easy, Sunny Side
Up, etc.

I am actually using the DB for bank routing numbers and things like
that, but to make it easy I choose food choices for my example.

Now, I have a table with the "Breakfast Lunch Dinner", and a combobox
will let you see that list and choose which 'meal' you want. I also
have all of the other tables setup with all of the food options and
whatnot.

My question is, how do I get a 2nd dropdown box to populate based upon
what is selected in the first one? Is that even possible? Is there
another way to go about this?

Any help would be appreciated.

Thanks.
Ed
Oct 5 '06 #3
AccessRookie wrote:
Ok, I am pretty new to Access (Using Access 2002 at my job). Here is
what I want to do.

I want to create a database that has a form. On this form will be a
dropdown menu (combobox). Depending on what you select in the first
drop down box, another dropdown box will be populated with specific
info based upon what was selected in the first box.

For example:
The first drop down box has "Breakfast" "Lunch" and "Dinner" as a
choice.
The user would select "Breakfast" and then the 2nd dropdown box has
"Eggs" "Sausage" "Pancakes" -
The user selects Eggs, and they can then choose Over Easy, Sunny Side
Up, etc.

I am actually using the DB for bank routing numbers and things like
that, but to make it easy I choose food choices for my example.

Now, I have a table with the "Breakfast Lunch Dinner", and a combobox
will let you see that list and choose which 'meal' you want. I also
have all of the other tables setup with all of the food options and
whatnot.

My question is, how do I get a 2nd dropdown box to populate based upon
what is selected in the first one? Is that even possible? Is there
another way to go about this?

Any help would be appreciated.

Thanks.
Ed
In combo1 you have a rowsource from a table something like
Select EatWhatID, EatWhat From Eating
and this displays breakfast, lunch, dinner. EatWhatID is a hidden
column value.

In Combo2, your rowsource might be
Select FoodsID, Food From Food Where EatWhatID = _
Forms!ThisFormN ame!EatWhatID

This links the EatWhatID in the Foods table to the EatWhatID in the
Eating table.

When you make a change, in the afterUpdate event for combo1, enter
something like
Me.Combo2.Reque ry
and this will force a requery of the rowsource for combo2 with the new
results available for selection.
Oct 5 '06 #4
"AccessRook ie" <ed*****@gmail. comschreef in bericht
news:11******** **************@ i3g2000cwc.goog legroups.com...
Ok, I am pretty new to Access (Using Access 2002 at my job). Here is
what I want to do.

I want to create a database that has a form. On this form will be a
dropdown menu (combobox). Depending on what you select in the first
drop down box, another dropdown box will be populated with specific
info based upon what was selected in the first box.

For example:
The first drop down box has "Breakfast" "Lunch" and "Dinner" as a
choice.
The user would select "Breakfast" and then the 2nd dropdown box has
"Eggs" "Sausage" "Pancakes" -
The user selects Eggs, and they can then choose Over Easy, Sunny Side
Up, etc.

I am actually using the DB for bank routing numbers and things like
that, but to make it easy I choose food choices for my example.

Now, I have a table with the "Breakfast Lunch Dinner", and a combobox
will let you see that list and choose which 'meal' you want. I also
have all of the other tables setup with all of the food options and
whatnot.

My question is, how do I get a 2nd dropdown box to populate based upon
what is selected in the first one? Is that even possible? Is there
another way to go about this?

Any help would be appreciated.

Thanks.
Ed
From a post of Bob Quintal on Cascading Comboboxes:
>>>
Here's a good one
http://experts.about.com/q/Using-MS-...scading-combo-
boxes.htm
here's a sample database example.
http://www.utterangel.com/pages/acce...nloads.aspx#43
>>>
john
Oct 6 '06 #5

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

Similar topics

1
4643
by: Brett Jungblut | last post by:
I need to be able to access (read and write) an older database (still in production use) that uses dbf files (clipper-style). The php manual says not to use the dbf functions for a production system - corruption can occur. Is it safe to talk to these DBs through ODBC? The machine is running winXP, apache, and php, and so far, I have no problems getting data from the DB files thru ODBC, but I'm a bit leery about writing... Don't want...
2
3603
by: Rene Pijlman | last post by:
I can't seem to find any way to specify the character encoding with the DB API implementation of PyPgSQL. There is no mention of encoding and Unicode in the DB API v2.0 spec and the PyPgSQL README. When I have Unicode strings in Python and store it in a PostgreSQL Unicode database, will the data automatically be correctly encoded? Or do I need to specify the UTF-8 client encoding on the database connection somehow? I'm using the...
5
1819
by: john | last post by:
Hi I am devlopeing a data centric intranetsite with data in mysql database I would like your opinion on this architecture Data will be fetched from database by python & converted into xml The XSLT will be stored on the client cache.So only the xml is transferred to client & the xslt transforms it into xhtml & displays it. Will this improve performance or have i gone nuts??
0
1155
by: It's me | last post by:
I've built a Python application using PythonCard 1.9 and Python 2.3 running under Windows XP. Everything works except that when I use the keyboard instead of the mouse to do certain operations in a data entry field (like Shift-Home), the program stops at line 1014 of wx-2.5.3-msw.ansi\wx\_core.py. def __getitem__(self, index): try: x = self.Get() except IndexError:
0
1063
by: Jim Douglas | last post by:
Are other's using the .NET stuff like this? Do you use the Dataobject or include the data access stuff in the BusinessObject? Does everyone use storedprocedures? Thanks! Jim Douglas http:\\www.genesis-software.com Latitude 32.5818
2
6440
by: Joachim Bauer | last post by:
I'm using the code below to display a menu that opens when the mouse goes over the main menu item (try it in your browser to understand the behaviour). It uses "position:absolute" and a switch between "display='none'" and "display=''". However the problem is that - in Internet Explorer 6 the dropdown (<select>...) always hides the menu
2
1365
by: Peter | last post by:
Hi, I could not find a group dealing with just regular expressions. This groups seems to answer such questions. Hence I am posting it here. In my grammar, I need to differentiate between GT and GE. GE is defined as ">=" GT is defined as ">"
14
3161
by: Michael | last post by:
Since the include function is called from within a PHP script, why does the included file have to identify itself as a PHP again by enclosing its code in <?php... <?> One would assume that the PHP interpreter works like any other, that is, it first expands all the include files, and then parses the resulting text. Can anyone help with an explanation? Thanks, M. McDonnell
1
4314
by: ismailc | last post by:
Hi, I need help please. Update system to to new version & moved on to .Net2 But now my code that worked in my .Net1 xslt does not work. .Net1 fine: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:asp="remove" xmlns:igchart="remove" xmlns:igsch="remove"> &lt;td class='rowDet' id="td_<xsl:value-of select='@name' />"&gt; .Net2 don't work: <xsl:stylesheet...
2
10624
by: chinni1 | last post by:
Hii.. I Have 2 dropdowns.The first dropdown contains main products which is from database table1. If we select The one of dropdown value then the 2 second drop down should fill with all sub products of that main products from another table2. Ex:: pulsor is the main product which is in 1 st dropdown pulsor 150cc,pulsor 180cc ,pulsor 180cc are the sub prod s of pulsor. when ever we select the pulsor on 1st dropdown it...
0
9650
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10164
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9962
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8992
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7515
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
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 we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.