Filter name in report (1 Viewer)

Atthe

Member
Local time
Today, 04:59
Joined
Oct 26, 2021
Messages
57
Good Morning All,

I have some filters in a form that are chosen before the report in created with a button, For clarification to the end users means the filtered field does not directly appear in the 'Detail' section of the report I created a text box with the control source set as the filtered field (Tag) which is in the header section. This has worked fine however I now have a query that filters on two criteria "Tooling" or "Inspection".

The issue I now have is that only one of my criteria's is returned to the textbox, what is the best was to return both criteria or one criteria? (Depending on the selected filter?

Thanks
 

oleronesoftwares

Passionate Learner
Local time
Yesterday, 20:59
Joined
Sep 22, 2014
Messages
1,105
This has worked fine however I now have a query that filters on two criteria "Tooling" or "Inspection".
Can we see the image of the query design or the syntax of the query(in sql view)?
 

Atthe

Member
Local time
Today, 04:59
Joined
Oct 26, 2021
Messages
57

Attachments

  • filter.PNG
    filter.PNG
    3.6 KB · Views: 138

oleronesoftwares

Passionate Learner
Local time
Yesterday, 20:59
Joined
Sep 22, 2014
Messages
1,105
The Or operator will check if at least one of the conditions is true, then will return the query based on it.

It is possible that the other criteria not been returned is not true.
 

jdraw

Super Moderator
Staff member
Local time
Yesterday, 23:59
Joined
Jan 23, 2006
Messages
14,240
Try the IN operator

Code:
SELECT * FROM tblTools
WHERE
tblTools.Tag IN("Inspection","Tooling")
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 23:59
Joined
Feb 19, 2002
Messages
35,834
If you are building the where clause in a form, build the text at that time. Then the report can get it from the form:
=Forms!myform!myfilter
 

Users who are viewing this thread

Top Bottom