Auto populate combo box range based upon previous selection 
March 26th, 2007, 06:55 PM
| | | Auto populate combo box range based upon previous selection
Hello All,
I am a new user to Access. I am currently designing a database
consisting of four tables for multiple users. Rather than bore you
with the goals and such, here is what I am attempting to do:
I have two combo boxes, the first of which contains three text values
(Org 1, Org 2, Org 3) and the second combo box contains a listing of
30 or so clients. I would like to condense the second combo box based
upon the selection of the organization in the first combo box.
For example, if I select "Org 2", I would like it to show the roughly
10 clients that are associated with Org 2 rather than the other 20
clients which do not pertain to that org.
Thanks in advance for the help. Please remember I am a new user to
Access. I realized after reading this forum I will probably be
redesigning soon but would like to solve this issue while it is top of
mind. | 
March 26th, 2007, 06:55 PM
| | | Re: Auto populate combo box range based upon previous selection
There are many ways to skin this cat. Set the source for cb2 to
include a filter on Org where Org =cb1.value. Then requery cb2 when
you change the selected value in cb1. That should be one way to
accomplish it.
On Mar 26, 2:49 pm, joseph.mccastl...@gmail.com wrote: Quote:
Hello All,
>
I am a new user to Access. I am currently designing a database
consisting of four tables for multiple users. Rather than bore you
with the goals and such, here is what I am attempting to do:
I have two combo boxes, the first of which contains three text values
(Org 1, Org 2, Org 3) and the second combo box contains a listing of
30 or so clients. I would like to condense the second combo box based
upon the selection of the organization in the first combo box.
>
For example, if I select "Org 2", I would like it to show the roughly
10 clients that are associated with Org 2 rather than the other 20
clients which do not pertain to that org.
>
Thanks in advance for the help. Please remember I am a new user to
Access. I realized after reading this forum I will probably be
redesigning soon but would like to solve this issue while it is top of
mind.
| | 
March 26th, 2007, 07:25 PM
| | | Re: Auto populate combo box range based upon previous selection
On 26 Mar 2007 11:49:35 -0700, joseph.mccastlain@gmail.com wrote: Quote:
Hello All,
>
I am a new user to Access. I am currently designing a database
consisting of four tables for multiple users. Rather than bore you
with the goals and such, here is what I am attempting to do:
I have two combo boxes, the first of which contains three text values
(Org 1, Org 2, Org 3) and the second combo box contains a listing of
30 or so clients. I would like to condense the second combo box based
upon the selection of the organization in the first combo box.
>
For example, if I select "Org 2", I would like it to show the roughly
10 clients that are associated with Org 2 rather than the other 20
clients which do not pertain to that org.
>
Thanks in advance for the help. Please remember I am a new user to
Access. I realized after reading this forum I will probably be
redesigning soon but would like to solve this issue while it is top of
mind.
| Leave the Rowsource property of the second Combo Box blank.
Code the AfterUpdate event of the Combo1 to something like this:
Me![Combo2].Rowsource = "Select TableName.[ClientName] From TableName
Where TableName.Organization = '" & Me![Combo1] & "' Order By
[ClientName];"
This assumes the bound column of Combo1 is Text datatype, not Number.
Change the Table and Field names as needed.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail | 
March 26th, 2007, 07:45 PM
| | | Re: Auto populate combo box range based upon previous selection
Same cat, different knife! :)
On Mar 26, 3:19 pm, fredg <fgutk...@example.invalidwrote: Quote:
On 26 Mar 2007 11:49:35 -0700, joseph.mccastl...@gmail.com wrote:
>
>
>
>
>> Quote:
I am a new user to Access. I am currently designing a database
consisting of four tables for multiple users. Rather than bore you
with the goals and such, here is what I am attempting to do:
I have two combo boxes, the first of which contains three text values
(Org 1, Org 2, Org 3) and the second combo box contains a listing of
30 or so clients. I would like to condense the second combo box based
upon the selection of the organization in the first combo box.
| > Quote:
For example, if I select "Org 2", I would like it to show the roughly
10 clients that are associated with Org 2 rather than the other 20
clients which do not pertain to that org.
| > Quote:
Thanks in advance for the help. Please remember I am a new user to
Access. I realized after reading this forum I will probably be
redesigning soon but would like to solve this issue while it is top of
mind.
| >
Leave the Rowsource property of the second Combo Box blank.
>
Code the AfterUpdate event of the Combo1 to something like this:
>
Me![Combo2].Rowsource = "Select TableName.[ClientName] From TableName
Where TableName.Organization = '" & Me![Combo1] & "' Order By
[ClientName];"
>
This assumes the bound column of Combo1 is Text datatype, not Number.
>
Change the Table and Field names as needed.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail- Hide quoted text -
>
- Show quoted text -
| | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 220,840 network members.
|