I'm trying to write a function for a search form where users select several items from combo boxes and then they select if they want the date for specified item be null or not.
If I have the correct structure of a query for the two examples at the bottom of this request, I can write the function. For now, I only need the structure of the filter of the query.
This is the structure of the tables:
and this is a part of tblProductionStage:
Users can select several stageFK (Number) and if they want them to be null or not.
Two Examples:
(StageFK=1 AND StageDate IS NOT NULL) AND (StageFK=2 AND StageDate IS NOT NULL) AND (StageFK=20 AND StageDate IS NULL)
In above image the record surrounded by blue square should be found. The red one won't be included in result.
another example:
(StageFK=1 AND StageDate IS NOT NULL) AND (StageFK=3 AND StageDate IS NULL) AND (StageFK=2 AND StageDate IS NOT NULL)
Both red and blue records won't be included in result. The red one has no squareFK=3 and the blue one's StageDate for stageFK=3 is not null.
Thank you.
If I have the correct structure of a query for the two examples at the bottom of this request, I can write the function. For now, I only need the structure of the filter of the query.
This is the structure of the tables:
and this is a part of tblProductionStage:
Users can select several stageFK (Number) and if they want them to be null or not.
Two Examples:
(StageFK=1 AND StageDate IS NOT NULL) AND (StageFK=2 AND StageDate IS NOT NULL) AND (StageFK=20 AND StageDate IS NULL)
In above image the record surrounded by blue square should be found. The red one won't be included in result.
another example:
(StageFK=1 AND StageDate IS NOT NULL) AND (StageFK=3 AND StageDate IS NULL) AND (StageFK=2 AND StageDate IS NOT NULL)
Both red and blue records won't be included in result. The red one has no squareFK=3 and the blue one's StageDate for stageFK=3 is not null.
Thank you.
Attachments
Last edited: