This problem has me gripping my hair in frustration.
I have two combo boxes 'cboType' and 'cboDepartment'. cboType contains a list of all types of medical devices and cboDepartment contains a list of all the departments that the devices can be found in.
The cboType combo box has the following code in its Row Source property:
SELECT DISTINCT EquipList.Type FROM EquipList ORDER BY EquipList.Type;
The cboDepartment combo box has the following code in its Row Source property:
SELECT EquipList.Department FROM EquipList WHERE (((EquipList.Type)=[cboType])) ORDER BY EquipList.Department;
Where EquipList is a table with the following fields:
ID (Primary key, Autonumber)
Type
Department
This works fine for me and the combo boxes cascade perfectly. cboDepartment shows only those values based on the choice in cboType.
However, when I change the entry in cboType, cboDepartment does not refresh. It still shows the previous values.
I tried the following things but none of them work:
1. Including "Me.cboDepartment.Requery" in the AfterUpdate property of cboType
1. Including "[Forms]![FormName]!cboDepartment.Requery" in the AfterUpdate property of cboType, just in case Access didn't realise which combo box it is that I want to requery.
3. Including the SQL of the RowSource property of cboDepartment in the AfterUpdate property of cboType.
I did all kinds of other things like include the code "Me.cboDepartment.Requery" in the OnChange property of cboType and even on the OnCurrent property of the form itself, but it doesn't work at all!!!
how do I get these combo boxes to synchronise?