Question cascading combo boxes :(

access-trouble

New member
Local time
Today, 08:57
Joined
Feb 3, 2011
Messages
3
hello there,

i have a database which keeps track of the accidents that happens in the schools on a daily bases,

i have three main tables,

1.accidents>> which has acc_id,date and time,place,parties_invo,no_invo(no. of students involved in this accident),school_id

2.school>> school_id,schoolname

3.studentsNschool>> contains names of students involved in each accident, it contains school_id,acc_id,student_firstname,student_lastname and class


now i need a form that contains two combo boxes ...

combo1 contains school names , when choosing a school the other combo2 is updated with the accident numbers that are associated with this school


how can i do this :confused:
 
You said "when choosing a school the other combo2 is updated with the accident numbers that are associated with this school".
What for you need a Combo2, when you update it automatic ???
 
hello

i.e. when i choose a school from combo1 i need the combo2 to display all accidents number related to this school

???
 
i still didnt get any reply :( please

Hi,
It's easy to populate one combo based on another combo.
You have to make query for your second combo. In the criteria, when you select the column id of the first combo ( in your case the school id in the first combo) the second combo will be populated only for the selected school.

example:

your first combo should have school id in your combo.
your second combo's rowsourse should have a query and school id field and the criteria for the school id should be like this:

[Forms]![YourForm]![yourFirstCombSchoolID]

can you upload to see your fields and data you want to filter in your combos?
 

Users who are viewing this thread

Back
Top Bottom