I have a public function in a standard module that adds records to a table. The function returns a comma-delimited list of the batch numbers that it added to the table including leading and trailing commas.
I am trying to run a query using the list to select just those records that are in the list.
SELECT * FROM AssignedBatches
WHERE GetBatchNumbers() Like '*,' & BatchNum & ',*';
GetBatchNumbers is the function that returns the comma-delimited list. And BatchNum is simply a field in the AssignedBatches table.
I am not getting any errors when I run the query. It simply opens an empty recordset.
This is my first time using a standard module, so I don't know if I'm missing something module-related or not. I've tested the function and it is indeed returning a list as it should, i.e: ,828,829,830, etc...
Thanks for your help!
AA
I am trying to run a query using the list to select just those records that are in the list.
SELECT * FROM AssignedBatches
WHERE GetBatchNumbers() Like '*,' & BatchNum & ',*';
GetBatchNumbers is the function that returns the comma-delimited list. And BatchNum is simply a field in the AssignedBatches table.
I am not getting any errors when I run the query. It simply opens an empty recordset.
This is my first time using a standard module, so I don't know if I'm missing something module-related or not. I've tested the function and it is indeed returning a list as it should, i.e: ,828,829,830, etc...
Thanks for your help!
AA
Last edited: