Hi again Brittaff.
I'm guessing the
BuildExhibits()
function is so long and complicated you want to avoid posting it in full. Understandable. However, at this point that may be the most reliable way of sharing what it does in a way we can understand. Describing such things clearly in English is never easy - and is particularly complex without a clear understanding of it yourself.
Although I see no direct answers to any of my direct questions I do see some stuff which I can determine some of the answers from. That isn't an ideal way to approach direct questions. Direct answers is what you should really be looking for. It saves enormous amounts of time being wasted.
Nevertheless, from the very limited snippet of code it seems clear that the procedure has no parameters and is designed to work directly on a table with a specific name as input data and another for output. We don't have the relevant code to know how that's handled, or even which table that may be, but it's certainly not designed to be flexible.
Brittaff:
Instead of data coming from the InputData table, I want it to come from the table "Filter" because it doesn't have all of the inputs, only the ones I want.
For this you will need to make changes to the
BuildExhibits()
procedure. Is that possible? If not then whoever gave this to you must have a very limited understanding of what's going on too.
The table references within
BuildExhibits()
(though we haven't seen any yet) are almost certainly hard-coded to "InputData" as they are not passed as a parameter. Thus that procedure is limited to working on that table exclusively as it stands.
Brittaff:
I don't know how to run the new table "Filter" through the public function BuildExhibits() (if it is even possible).
As it stands, no - it isn't possible.
That said, it would be fairly trivial work to update that procedure to take a table name as a parameter and use that within it instead of the string "InputData". I could explain but it may be easier, and more reliable, if you posted the existing code of that procedure & I could post back an updated version that allowed you to change the input table if desired by including it as a parameter.
Brittaff:
I am unsure whether VBA code or a Macro would be the best way to execute this.
A basic question at last. VBA. Simples!
PS. Adding parameters to allow you to use names for other parts of the process (EG. Output table name.) which may default to one value but allow overriding, is pretty straightforward. If you need that too then let us know.
PPS. IslaDogs also mentioned the idea of of using the output of a SELECT query instead of an actual table, and this would definitely be a better way to approach this. However, I suggest we learn to walk first and maybe look at that idea later on when some of the basics have been dealt with. It will all make much more sense to you once you've built up a little experience.