Creating filtered Drop Down / Combo Lists

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am trying to improve the functionality of my form by providing a filtered
combo boxes.

I have 2 tables

School Name (School ID, School Name)
Course Name (Course ID, School ID, Course Name)

I want my users to be able to select a school and then the Course Name Combo
only provide them with the Courses that are available at that school. Is this
possible?

I am pretty new at coding in Access, so please provide details if coding is
involved.

Any help is much appreciated.

Thanks

Bhavini
 
Bmistry said:
Hi,

I am trying to improve the functionality of my form by providing a
filtered combo boxes.

I have 2 tables

School Name (School ID, School Name)
Course Name (Course ID, School ID, Course Name)

I want my users to be able to select a school and then the Course
Name Combo only provide them with the Courses that are available at
that school. Is this possible?

I am pretty new at coding in Access, so please provide details if
coding is involved.

Any help is much appreciated.

Thanks

Bhavini

This page shows two methods for doing what you ask:

http://www.mvps.org/access/forms/frm0028.htm
Forms: Limit content of combo/list boxes

Post back if that doesn't explain it clearly enough.
 
Hi,

I am trying to improve the functionality of my form by providing a filtered
combo boxes.

I have 2 tables

School Name (School ID, School Name)
Course Name (Course ID, School ID, Course Name)

I want my users to be able to select a school and then the Course Name Combo
only provide them with the Courses that are available at that school. Is this
possible?

I am pretty new at coding in Access, so please provide details if coding is
involved.

Any help is much appreciated.

Thanks

Bhavini

Leave the Combo2 combo box rowsource blank.

Code the Combo1 combo box AfterUpdate event:

Combo2.Rowsource = "Select [CourseID], [CourseName] from
[TableCourseName] Where [TableCourseName].[SchoolID] = " & Me.[Combo1]
& " Order By [CourseName];"

The above assumes the SchoolID datatype is Number.

If you really do have a table and a field both named "Course Name" or
"School Name", it is not a good idea. Change the name of the table to
tbCourseName or tblSchoolName. Let's not get Access confused. It's
also considered better practice to not include a space within a table
of field name.
 
Back
Top