Re: Creating filtered Drop Down / Combo Lists

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.
.



Relevant Pages

  • Re: vim and colors
    ... > I am connecting to my Linux box at school using putty and use vi (vim) ... > for coding, but unfortunately colors are black and white.. ...
    (comp.editors)
  • vim and colors
    ... I am connecting to my Linux box at school using putty and use vi (vim) ... for coding, but unfortunately colors are black and white.. ...
    (comp.editors)
  • Re: Ideas for M.A. thesis in Cognitive Science
    ... I just posted on the school of AI conversation. ... An example coding ... classic thesis. ... Douglas Eagleson ...
    (comp.ai.philosophy)
  • Re: Ideas for M.A. thesis in Cognitive Science
    ... I just posted on the school of AI conversation. ... An example coding ... classic thesis. ... Douglas Eagleson ...
    (comp.ai.philosophy)
  • Creating filtered Drop Down / Combo Lists
    ... I am trying to improve the functionality of my form by providing a filtered ... combo boxes. ... School Name ... I am pretty new at coding in Access, so please provide details if coding is ...
    (microsoft.public.access.forms)