473,396 Members | 2,030 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,396 software developers and data experts.

Help with limiting drop-down boxes.

I am building a database in access where I have a drop down box that
relates to a text box, that part I have working but when someone
selects information from the first drop down I need it to limit the
second drop down to just the related information. Explaining this is
obviously challeging. So I'll try to draw a picture:

(drop down 1) Select number --- once selected description is populated
in text box
(drop down 2) based on first drop down number selected you get another
list of numbers to choose from which relate to other information
(drop down 3) final drop down that is limited to selections from drop
down 2

Any help that anyone can provide would be great!

Thanks,
Karin

Jun 5 '06 #1
7 2409

callawayglfr wrote:
I am building a database in access where I have a drop down box that
relates to a text box, that part I have working but when someone
selects information from the first drop down I need it to limit the
second drop down to just the related information. Explaining this is
obviously challeging. So I'll try to draw a picture:

(drop down 1) Select number --- once selected description is populated
in text box
(drop down 2) based on first drop down number selected you get another
list of numbers to choose from which relate to other information
(drop down 3) final drop down that is limited to selections from drop
down 2

Any help that anyone can provide would be great!

Thanks,
Karin


I'll try to be brief. Your 2nd and 3rd drop down boxes would have their
rowsources based on queries with parameters set to the values of the
1st and 2nd combo boxes respectivly. You would then simply do a
listbox2.requery on the after update event of the 1st combo box, and a
listbox3.requery on the after update event of the 2nd combo box.

Jun 5 '06 #2
On 5 Jun 2006 11:31:17 -0700, callawayglfr wrote:
I am building a database in access where I have a drop down box that
relates to a text box, that part I have working but when someone
selects information from the first drop down I need it to limit the
second drop down to just the related information. Explaining this is
obviously challeging. So I'll try to draw a picture:

(drop down 1) Select number --- once selected description is populated
in text box
(drop down 2) based on first drop down number selected you get another
list of numbers to choose from which relate to other information
(drop down 3) final drop down that is limited to selections from drop
down 2

Any help that anyone can provide would be great!

Thanks,
Karin


Leave the rowsource property of Combo2 and Combo3 blank.

Combo1, in the following code, is used to select a ClassID, for which
Combo2 will display that Classes Instructors.

Code the AfterUpdate event of Combo1 to fill the rowsource
of Combo2.
Something like this:

Combo2.Rowsource = "Select Instructors.InstructorID,
Instructors.InstructorName from Instructors Where Instructors.ClassID
= " & Me!ComboName & ";"

Change the table and field names as needed.
The above assumes ClassID is a Number datatype and the combo1 bound
column is Number also.

Then use the Combo2 AfterUpdate event, similarly to the above code, to
fill the rowsource of Combo3.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jun 5 '06 #3

fredg wrote:
On 5 Jun 2006 11:31:17 -0700, callawayglfr wrote:
I am building a database in access where I have a drop down box that
relates to a text box, that part I have working but when someone
selects information from the first drop down I need it to limit the
second drop down to just the related information. Explaining this is
obviously challeging. So I'll try to draw a picture:

(drop down 1) Select number --- once selected description is populated
in text box
(drop down 2) based on first drop down number selected you get another
list of numbers to choose from which relate to other information
(drop down 3) final drop down that is limited to selections from drop
down 2

Any help that anyone can provide would be great!

Thanks,
Karin


Leave the rowsource property of Combo2 and Combo3 blank.

Combo1, in the following code, is used to select a ClassID, for which
Combo2 will display that Classes Instructors.

Code the AfterUpdate event of Combo1 to fill the rowsource
of Combo2.
Something like this:

Combo2.Rowsource = "Select Instructors.InstructorID,
Instructors.InstructorName from Instructors Where Instructors.ClassID
= " & Me!ComboName & ";"

Change the table and field names as needed.
The above assumes ClassID is a Number datatype and the combo1 bound
column is Number also.

Then use the Combo2 AfterUpdate event, similarly to the above code, to
fill the rowsource of Combo3.


This sounds a lot like what I need too, but I'm so new, I don't really
understand. :(
Is there a good tutorial with a glossary and SQL syntax explained in
plain english to start with? I'm guessing these are SQL statements?
I wanna learn, but I'm not sure where to turn first.
I'm barely past using wizards and drag and drops, peaking into property
box statements. The termionology is still overwhelming :(
Some pointing in the right direction would me much appreciated!!! TIA

Jun 5 '06 #4

co********@yahoo.com wrote:
fredg wrote:
On 5 Jun 2006 11:31:17 -0700, callawayglfr wrote:
I am building a database in access where I have a drop down box that
relates to a text box, that part I have working but when someone
selects information from the first drop down I need it to limit the
second drop down to just the related information. Explaining this is
obviously challeging. So I'll try to draw a picture:

(drop down 1) Select number --- once selected description is populated
in text box
(drop down 2) based on first drop down number selected you get another
list of numbers to choose from which relate to other information
(drop down 3) final drop down that is limited to selections from drop
down 2

Any help that anyone can provide would be great!

Thanks,
Karin


Leave the rowsource property of Combo2 and Combo3 blank.

Combo1, in the following code, is used to select a ClassID, for which
Combo2 will display that Classes Instructors.

Code the AfterUpdate event of Combo1 to fill the rowsource
of Combo2.
Something like this:

Combo2.Rowsource = "Select Instructors.InstructorID,
Instructors.InstructorName from Instructors Where Instructors.ClassID
= " & Me!ComboName & ";"

Change the table and field names as needed.
The above assumes ClassID is a Number datatype and the combo1 bound
column is Number also.

Then use the Combo2 AfterUpdate event, similarly to the above code, to
fill the rowsource of Combo3.


This sounds a lot like what I need too, but I'm so new, I don't really
understand. :(
Is there a good tutorial with a glossary and SQL syntax explained in
plain english to start with? I'm guessing these are SQL statements?
I wanna learn, but I'm not sure where to turn first.
I'm barely past using wizards and drag and drops, peaking into property
box statements. The termionology is still overwhelming :(
Some pointing in the right direction would me much appreciated!!! TIA


Jun 6 '06 #5

There is a Microsoft article "Basing one combo box on another" at
http://office.microsoft.com/en-au/as...730581033.aspx.

Jun 6 '06 #6

Mary wrote:
There is a Microsoft article "Basing one combo box on another" at
http://office.microsoft.com/en-au/as...730581033.aspx.


Thanks,
I read through that few days ago, it talks about doing it through
forms, which I've done before. I'm sorry I didn't make that clear.
I would have sworn I've seen it done with just using preset text
lookup, and a query feeding into a table, without making a form. I
don't have the dadabase I was looking at few months ago to deconstruct
and see what they did. I remember seeing a long dropdown list in ine of
the tables that filtered another dropdown further down in the same
record. Then I went looking for a table for the first dropdown, and
realized it was just a text list with preset values, no table, which
surprized me a little, since I've always done it with a table through a
form. It was done by some professional database guy...

Can it be done at all without using forms, in access?

Right now, not finding anything addresing that in help and tutorials,
I'm not sure if it's because I don't remember something right, and it
can't be done at all, or if tutorials don't want to teach a possibly
improper or disantvageous way of doing something.

Jun 6 '06 #7
With tables in Access you can specify a lookup against a field, in the table
design. That lookup can have the same rowsource that is valid in a combobox
or listbox - value type, field list, or SQL, or table name.

I havent' seen any way, in the table design, to make another field, that
also uses a dropdown list (looiup), filter its list based on the contents of
the first field.

Curious to know if anyone knows how to do such a thing.
Jun 6 '06 #8

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

Similar topics

3
by: Bruce D | last post by:
Here's the breakdown: MySQL 4.0.12 Table: Assignment (indexes are created on proper fields) 419,234 records Table: Finders (indexes are created on proper fields) 5,345,657 records My user wants...
7
by: pkruti | last post by:
Below is a stored procedure i am working with and i am trying to drop the yesno_holding table if it exists but how do i add it back? Meaning i want it to drop if it exists but i want to add it back...
1
by: Ron | last post by:
I have a pre-printed form that I've basically duplicated in Access 2000 with the form wizards. It uses a main form for the basic info on a client, then a subform for the transaction lines. I've...
4
by: N J | last post by:
Hi, I ahve developed a program using access and am distributing it using MDE's, I ahve had many requests for a demo. I was thinking of limiting the number of records to say 100? If anyone has...
1
by: Gary | last post by:
Hi, I am working with drag and drop functionality. I am draging a button and dropping in a text box. I am able to drop only button text value. 1) Can i drop button itself? 2) If i work with a...
7
by: teddysnips | last post by:
Table DDL below: The tables I have contain Timesheet information. Each row in the tblTSCollected table contains an entry for an employee into the timesheet system, specifically by scanning the...
0
by: josh.23.french | last post by:
Here's the code i have: $db = array(); //main array $db = array(); //table `main` $db = array('id'=>0, 'username'=>'joshfrench','userpass'=>'password','userlevel'=>'admin'); //row $db =...
11
by: tracy | last post by:
Hi, I really need help. I run this script and error message appeal as below: drop trigger log_errors_trig; drop trigger log_errors_trig ERROR at line 1: ORA04080: trigger 'LOG_ERRORS-TRIG'...
4
by: Andrew | last post by:
I want to create a set of Activity Diagram controls for process control. I need to create a base Diagram control that acts as a container for the Activity controls ( StartPoint, EndPoint,...
53
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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
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...
0
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...
0
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...
0
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,...

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.