combo box requery

tjones

Registered User.
Local time
Today, 02:12
Joined
Jan 17, 2012
Messages
199
I have two combo boxes Program that has several programs (HHP, BMD, etc) and and Desc91 . I want the the selection in the Program field to filter the Desc to just display the selected type instead of a full list. The problem is that after filling in the complete record and selecting a new record the Desc91 field displays 2 of whatever was in the first record. example: BMD 410 and BMD 410 instead of just once.

I have the selection filtered down using: Like [Forms]![CourseTaken]![Program] which works.

I tried requerying on the Program and then on the Desc91 combo boxes After Update but that didn't work.
Then I tried using VBA Forms!CourseTaken.Desc91.SetFocus
Forms!CourseTaken.Desc91.Requery
 
Try Requerying using the Lost Focus event of your Master Combo. You will also need to Requery the Cascaded Combo in the Form's On Current event, to ensure the Cascaded Combo stays synchronised with the Master Combo, as your user scrolls through the records.
 
Unfortantly I think I am doing something wrong.

I made a query and set it as the row source for the Description field

SELECT Courses.CourseID, Courses.DepartmentID, Courses.CourseNo, Courses.CourseName
FROM Courses
WHERE (((Courses.DepartmentID) Like [Forms]![CourseTaken]![Program]))
ORDER BY Courses.DepartmentID, Courses.CourseNo, Courses.CourseName;

This works to narrow down the list but when I go to add the second record the Desc91 (control source DepartmentID) displays the selection from the first choice.

So when I add a Requery Macro to the Program field (Master) and add a
form ON Current Requery Me.Requery the form either freezes or the Desc91 list disappears altogether.

Thanks for any help with this matter. Don't know how the problem changed from doubling to disappearing!
 

Users who are viewing this thread

Back
Top Bottom