Dependent Comboboxes not working in subform

AlexN

Registered User.
Local time
Today, 22:52
Joined
Nov 10, 2014
Messages
302
Well, I’m sure this isn’t the first time someone posts this issue, I’ve already found one but I saw no answer, or at least, I didn’t understand it.
In the attached database project, we have every day transactions (tblExpenses), of different Species (tblSpecies) each one belonging to a Category (tblCategories). There’s also a table (tblCategorySpecies) that declares which Species belongs to what Category.
In tblExpenses the Category field is a lookup value in tblCategory, and the Species field is a lookup value in the tblSpecies.
Subsequently we have a small testing form (frmExpenses) that has two combo boxes, the listCategoryID taking values from the tblCategories, and the listSpeciesID taking values from the tblSpecies. In order to eliminate the listSpeciesID values, depending on the listCategoryID chosen value, I created a popup form (frmSpeciespopup) which with the appropriate VBA code does the job adequately in frmExpenses
Let’s now suppose I want to divide tblExpenses, in two tables, one containing only the transaction date, and the other containing all other transaction details, in order to avoid inputting the same transaction date over and over again for multiple transactions.
In that case we would have a main form with the transaction date field, and frmExpenses would be a subform in this form. After testing this structure, the above process of the dependent combo boxes doesn’t work.
I’m working in Access 2013.
Any ideas of fixing this?

Thanks in advance
 

Attachments

Last edited:
After the first is selected, requery the second.
 
Thank you for posting your answer. Of course I do requery the second in the After_Update procedure of the first, but this only seems to be working as long as the form is a main form. When the form becomes a subform in another main form, nothing works right.
Well, done some searching, reading and testing, and came to the conclusion (not mine of course), that this is a limitation of Access. Access doesn’t support dependent comboboxes in a subform. However it seems there’s a way of doing this, designing the project with a completely different approach, and somehow cheating Access itself and the user’s eye, by bringing up a couple of unbound text boxes.
I’m testing this structure in the next couple of days, and as soon as I’m sure it’s working fine, I’ll post the solution here.
Meanwhile, anyone comes with a solution, is more than welcome.


Thanks again
 
The second combo box is probably not filtered correctly.
 
I finally got a solution that seems to work perfectly fine.
Anyone who wants to know how, just download the two files attached.

Thanks to everyone who gave a damn.
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom