I'm trying to filter one combobox based on the values of another combo box.
I have a buildings table and a rooms table. There are many rooms in one building and a room can have the same name but be in a completely different building, and thus, be a completely different room. I have a subform which allows me to select a building name. But when I try to select a room, it shows duplicate values as well as rooms which do not belong to that building.
I've tried the method of creating two combo boxes and adding the building ID to the room combo box and then specifying the building combobox. It doesn't work, it asked me to enter parameter value for [forms]![frmBuildings]![BuildingName]. If I hit cancel and try to select a building, there is nothing in the rooms combobox. I've tried this using unbound combo boxes and it worked just fine. But I need them to be bound to a ID, so that won't work.
I've tried doing this using VBA, but I couldn't get the code right. Your help is appreciated.