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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Don't want to display records basd on a value in another field.

Status
Not open for further replies.

toolman2

Technical User
Jul 31, 2001
12
I'm struggling with this for some reason. I've looked for a similar problem but no luck.
I want to NOT display a record in the detail section of my report when the value of a certain field is "TP". I've tried the IIF statement for individual fields but I want the whole row to not print. I'm a novice at code, so if there is a way to do this without it, that would be great.
Thanks
Kev
 
Hi, you might place <not like &quot;tp&quot;> in the criteria section of the field in your underlying query. It should exclude iny records contining &quot;tp&quot;.
 
Thanks for your reply pdldavis.
I can get the field that carries the &quot;TP&quot; info to display a blank field when that criteria is satisfied however, what I would really like to do is basically not display that whole row or record on my report. I guess I am willing to try code, but I'll need to be treated as a dummy when it comes right down to specifying it. Gotta learn it sometime.
Thanks
Kev
 
Thanks for your reply pdldavis.
I can get the field that carries the &quot;TP&quot; info to display a blank field when that criteria is satisfied however, what I would really like to do is basically not display that whole row or record on my report. The info that &quot;TP&quot; is linked to is still displayed in my header section on the report, so I still want it to be retrieved - just don't want that info in my detail section. I guess I am willing to try code, but I'll need to be treated as a dummy when it comes right down to specifying it. Gotta learn it sometime.
Thanks
Kev
 
Hi, I guess I don't quite understand. If you filter on 'not like &quot;tp&quot; ' in your query, then the whole record will not be displayed on your report. I would think that if 'tp' is filtered out of your query then any related text box's in your report header would show nothing as well because there is nothing to display. You can get a lot fancier than that, of course, but you might look at that query again.
Hope that helps.
 
You might want to try this:

In the On Format event for the Detail section of your report, put a statement like this, of course changing to your field names:
Code:
If YourField = &quot;TP&quot; Then Cancel = True

This will cancel the printing of the detail line.

Hope this helps......
 
Thanks all for your help.
I have been able to achieve what I wanted. Basically I created IF statements in each field to create blank text boxes when the statement was true, then selected the Can Grow feature to be yes for each text box. I then reduced each text box to a line. When the condition is met, there is no empty row appearing for that record (actually, there is, it's just real thin)but it appears that that record isn't being shown. When there is a valid record that I want to show, the text box will grow to accomodate(sp?) the data. It works for me.
Thanks
Kev
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top