Cascading combo box not updating when new selection made in Access 2007

Posted on 2009-02-23
Last Modified: 2012-05-06
HI there, I know there are heaps of topics on Cascading combo boxes and I have followed each one carefully but cannot work out why I am having this problem.  

I have a form called frmEnquiry and it has two combo boxes:  Course and Topic.  When you select a value in Course, then it will show the Topics related to that course

The row source for Course is qryCourses and for Topic, is qryTopic
I have created two queries:

qryCourses - select CourseId, Course from Courses

qryTopic - select TopicId, CourseID, Topic from Topics
and in the criteria, I have typed [Forms]![frmEnquiry]![Course] (in the design view)

In the After_update property for Course, I have used Me.Topic.Requery and I have used the same for the Current property for the form.

When I view the form initially, the second combo box is displaying the correct values however if I change the value in the Course Combo box, it is not being passed through to the Topic Combo box so the Topic combo box is still showing the values from the first selection.

I have been over this several times but cannot work out why it is not working.

Any ideas would be much appreciated
Question by:lesleyag

    Author Comment

    One more thing I forgot to ask, how do you resize a form in Access 2007?  I want to display the form above as a small form on the main form but control its visibility so don't want to have a full-size form.
    LVL 8

    Accepted Solution

    Double check that your course combo box has it's "bound column" property set to the column index of the id field.
    eg. your query might return columns
    "CourseName", "CourseId"

    The first column will become your combobox text, and if you set bound column 2 it will change the returned value of the combobox to reflect the value of the "CourseId" field.

    The add "On Change" event to the course combobox, and add the code to run a requery on the topic combobox.
    LVL 74

    Expert Comment

    by:Jeffrey Coachman

    As you know, you are only allowed one question per post.

    Can this be a new question?:
    "One more thing I forgot to ask, how do you resize a form in Access 2007?  I want to display the form above as a small form on the main form but control its visibility so don't want to have a full-size form.
    ...This is so you can get one answer to one question.

    It also gives other experts a chance to help you out.



    Author Comment

    sorry I clicked the button before I had typed this part but I will put it as another question

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
    I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now