Filter one field based on value in another

Sorry, I wasn't thinking. Because the code runs in the subform itself, all you need is the

Me.cboCourseTitle.Requery

that was there before. What needs to change is the criteria in the second combo's row source query.

Forms!frmStudents_Exams!sbfrmExams.Form!cboSemester
 
Thanks. :rolleyes:That works. The only thing is that now when I select a semester I get a dialog box that appears and shows the ID number for that semester.

So for example I select WI10 and a dialog box appears that says 1 and I have to click OK.

Not sure why it's doing that.

Actually I figured it out. It was that last bit of code for the message box. Took that out and it works fine.
 
Last edited:
Sorry, I had that in there to test and forgot to take it out.
 
Oops! Found a problem. When I select the semester it appropriately filters the choices for the CourseTitle; however, if I try to select a different semester while still in the same record it will still show the list of courses for the semester that was selected first. It seems to need to refresh afterward or something so each time it is reselected it loads up the corresponding list. Any ideas?

Thanks for all your help so far!
 
Could this also be related to why the selected course stays in the combobox even when a new record is selected?
 
Hi. I've got a pretty similar problem, but it's less 'first event' than Sue's. I've got fields on a form showing ethnic categories and ethnic types ( there are 3 or 4 possible types per category). So it's main role is to report existing categories and types. If edited, or new, however, the type choice needs to reflect the category chosen, but can't be change dependant: most editing changes are changes to types of (e.g. White or Asian) category. So it just needs to constrict type choices. I tried to do it with cascading combos, but they're not very good on the existing reporting. Any ideas?
 

Users who are viewing this thread

Back
Top Bottom