By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,396 Members | 2,501 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,396 IT Pros & Developers. It's quick & easy.

Help with limiting drop-down boxes.

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a

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

P: n/a
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

P: n/a

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

P: n/a

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

P: n/a

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

P: n/a

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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.