Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I omit certain data in a report that is in a query? 1

Status
Not open for further replies.

Scoob55k

Technical User
Nov 16, 2005
62
US
Is it possible to omit certain data in a report that is in the query associated with the report?

I know most would think for me to omit the data in the query, but I'm working on that in another post on here and until if and when I figure that out, this would be a work around. Thanks!
 
Scoob55k
I'm not sure exactly what you are trying to omit. However, just because there is a query behind the report doesn't mean that you have to pull all the data from the query into the report.

For example...
Say that your query is for quantities of different kinds of fruit - apples, oranges, bananas, peaches - and the table behind the query shows...
Apples 14
Oranges 12
Bananas 82
Peaches 27

If you want to show only Apples and Bananas, you just pull those fields into the report.

This would hold for any query. Just use what you need.

Tom
 
Sorry my friend I was unclear.

What I have is a field with comments typed by users. The default I made was "No Comments". I want the report to pull all the comments other than "No Comments".

I can do this individually fairly easy by putting "<>Comments" in the criteria line in the query, however when I add multiple fields with comments and put that criteria for each it doesn't return any data.

Make sense now, a little? Thanks!
 
Either way it does not return any records as if one field has "No Comments" it will not show any, but thanks for the tip. I'll use it in the future.
 
Scoob55k
The other thing you could try is...

On the Format event for the Detail section of your report, put the following code...
Code:
If Me.Comments = "No Comments" Then
Me.Comments.Visible = False
Else
Me.Comments.Visible = True
End If

I have shown the field in question as Comments, but change it to its name if that isn't accurate.

Tom
 
Awesome tip Mr. Watson, but will not apply to my application. I tried it and it works no doubt, but other data is scewed because of this.

I have an idea on maybe how I can fix that. Thank you vary much. Although I haven't got what I wanted, I increased my knowledge and options. Thank you.

Have a great day!
 
So, you have multiple comment fields, each of which can have "No Comments" in it?


Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Yes GingerR.

In trying to reduce the amount of queries and reports I need to make, all tips given so far fix the issue at hand, but mess another part up so far.

Working with the Format Event tip above. I may be able to get that to work. As always, all suggestions welcome. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top