Re: Creating filtered Drop Down / Combo Lists
- From: fredg <fgutkind@xxxxxxxxxxxxxxx>
- Date: Mon, 13 Jun 2005 22:10:18 GMT
On Mon, 13 Jun 2005 14:41:02 -0700, Bmistry wrote:
> 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.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
- References:
- Creating filtered Drop Down / Combo Lists
- From: Bmistry
- Creating filtered Drop Down / Combo Lists
- Prev by Date: Transparent Background for Form
- Next by Date: If statement, wrong result?
- Previous by thread: Re: Creating filtered Drop Down / Combo Lists
- Next by thread: Transparent Background for Form
- Index(es):
Relevant Pages
|