How to filter records based on several records from calling class


How do you open a form that is filtered based on multiple records from the calling class?

For example, I have a table ItemCategory that has an itemid field. It then has a many-to-many relationship with the inventtable (one item can belong to many categories and one category can have many items).

I have a class wherein I need to get items belonging to one category and then open up the inventtable form such that when the form opens, it is already filtered showing only those matching items.

I saw this solution :…/

Is there another way or better way of doing it? My problem with the solution above is that you have to specify the items explicitly in the query range. I am looking for something automatic, if any, like specifying that it is just really an inner join between a table result of the calling class and the inventtable?


You can do one thing…

Try to save the ranges which you are using to return the records in the class. and send those ranges to the form directly thorugh args… try to filter the form records based on the args…

please go through the args class –

You can, for example, save IDs of records to be filtered to a TempDB table, pass its reference to the target form and then create an exist join with the main data source.

Hi Martin/Chaitanya,

Thanks for your replies. Yes, I think the temp table solution is the best solution so far.