Can I hide detail lines on a report if they do not fit certain?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to hide lines on a report which I cannot seem to filter using a query.
I need to hide lines where to columns on the table do not equal each other.
 
Hi

There is no reason why you couldn't do that in a query...

select bla from blu where a <> b ?

Martin
 
C3JEM said:
I need to hide lines on a report which I cannot seem to filter using a query.
I need to hide lines where to columns on the table do not equal each
other.

Why can't you check equality?

SELECT * FROM TableName
WHERE (((IIf([Field1]=[Field2],True,False))=True));
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Perhaps, the more usual / correct way is to filter the Records / rows out in
the Query.

Post relevant details of the Table(s), the SQL String of the Query and
describe what you want to filter out relating to the Table details / SQL
string and someone should be able to suggest possible solution(s) ...
 
The query will be by far the easiest and most reliable way to do this.

Switch your query to SQL View (View menu.)
Change the WHERE clause so it looks something like this, replacing Field1
and Field2 with the names of your fields:

WHERE (([Field1] Is Null) OR ([Field2] Is Null) OR ([Field1 <> Field2]))
 
Why can't you check equality?

SELECT * FROM TableName
WHERE (((IIf([Field1]=[Field2],True,False))=True));

Actually that should be = False as in:

SELECT * FROM TableName
WHERE (((IIf([Field1]=[Field2],True,False))=False));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top