Hello Everyone,
I am currently working on a VBA function that will allow a user form to search through a database based off of up to 3 properties. The user will be allowed to select which properties they want to search for. As a result, with the way I have set up my code, each combobox will allow a user to select 1 property and I populate the search results into an array for reach combobox.
I am stuck on the final step of this code because I need to display the results of the search onto a work sheet. So I need a way to consolidate the three arrays from each combobox into a final "results" array that only display data entries selected by all of the combobox arrays. Would anyone have any suggestions on how I would set up this "consolidation" process? Since the user will be allowed to select up to three properties to search for it is not necessarily follow that all 3 must be selected, 1 and 2 maybe the only one selected or 3 only, etc,etc. Would I need to write code for each permutation? or is there a way to take into consideration all of the different ways a user can select properties to search? Any advice would be greatly appreciated! And please let me know if you need further clarification on the problem.
Thanks!
I am currently working on a VBA function that will allow a user form to search through a database based off of up to 3 properties. The user will be allowed to select which properties they want to search for. As a result, with the way I have set up my code, each combobox will allow a user to select 1 property and I populate the search results into an array for reach combobox.
I am stuck on the final step of this code because I need to display the results of the search onto a work sheet. So I need a way to consolidate the three arrays from each combobox into a final "results" array that only display data entries selected by all of the combobox arrays. Would anyone have any suggestions on how I would set up this "consolidation" process? Since the user will be allowed to select up to three properties to search for it is not necessarily follow that all 3 must be selected, 1 and 2 maybe the only one selected or 3 only, etc,etc. Would I need to write code for each permutation? or is there a way to take into consideration all of the different ways a user can select properties to search? Any advice would be greatly appreciated! And please let me know if you need further clarification on the problem.
Thanks!