Slowly working through the coding and have come up with an issue I thought would be a bit easier than it turns out to be.
Still on the Apiary / Hive / Inspection for Bees app and am working on the Log form for the Hives.
The default view is to list all the Hives in all the Apiaries and for someone with multiple Apiaries, this could obviously be cumbersome. So, I have created an unbound combo box that gets its list of items from a query, Q_Lookup_Apiary pulling from the T_Log_Apiary table. The reason for using a query is so I can filter out a fixed Apiary entry used to store In-Active hives.
I have this control set to show 2 columns for development so I can see the actual Apairy_Log_ID value next to the common name. In the final version, the bound column would be column 1 (the first column is 0, correct?).
The Drop-Down works fine and I have an even set up to execute On Change. For some reason, it simple isn't working. I've tried several types of syntax for the ApplyFilter command but it generally just keeps coming up with a pop-up asking for the value to filter by. For some reason, it won't pick up the value from the Combo-Box.
Here showing the form with the drop-down.
And here showing the code. The statement not working is the Else code.
I thought this would be the easy part. Next comes the harder part where I want to add another value in the Drop-Down list the reads something like "All Apiaries" that will trigger the first part of the If statement. And this value that is not in the table needs to be the default.
Have been researching that but it looks complicated for my skill level.
Anyway, even if I can get the first part of this addressed, at least that's a step. I can always put in another button to remove the filter though that's not optimal for aesthetics.
Any help is always appreciated.
I have uploaded the most current version of the file as well.
The best way to get to the Hive Log form is to use the F_Main_Overview form and select the 2nd option to open the Hive Log. Opening the form through the menu runs some code to set certain values in the Hive form.
![]()
![]()