So, I use a Combo Box based on a custom query to apply a filter to some of my continuous format forms. Works well.
The combo box is set up presently for two columns but only the first column is visible. The first column is the user friendly description and the second column is the Primary Key for the items in the column list.
When I apply the filter, I use column 2 (Column(1) in the VBA code since it starts at zero for coding purposes) and column 2 is my bound column (the combo box is not bound to a Control Source).
Now, say I want to carry that filter value to the next or even previous form. I decided to make a Public Variable, "ApiaryFilter" to store the value of the Combo Box.
Question, since I use Column 2 as the Bound Column on the various forms, do I still need to explicitly call out Column(1) in the code ?
Would it be better or would it make a difference if I change the order of the columns so that the Primary Key was actually in the first column and the descriptive test in the second column and just adjust my column width values accordingly ? (I currently have column 2 at zero width so only the text shows in the drop down)
My current code doesn't seem to be working correctly
ApiaryFilter is the Public Variable and Combo_Filter_By_Apiary is the combo box name.Code:ApiaryFilter = Combo_Filter_by_Apiary.Column(1)
If I leave off the .column(1) would it automatically select the bound column ?
I probably made this more confusing by trying to over explain it but, well, hopefully it's understandable.