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

Show a text on report only when a checkbox is checked

Status
Not open for further replies.

Xiphiaz

Programmer
Dec 29, 2003
33
NL
Hi,

I'm using a report to print a label to put with defective parts we receive.
Some of these parts need to be Scraped, if this is the case then I want in big letters "scrap" on the report.

I want to use for this the same report that I'm also using for the non-scrap parts.
The control of "scrap" is a checkbox on my Form.

So: if "scrap checkbox" is checked in my form only than show big "SCRAP" on report.

Can anyone help me on this? Thanks [2thumbsup]

 
Use the Format event of the report to set the visibility of say, txtScap:

[tt]Me.txtScrap.Visible=Me.Scrap[/tt]
 
It works! to good... [sadeyes]
But thanks alot [sunshine] I'm a big step closer to were I want to be.

The problem that I now have is:
The report is as big as an A5 piece of paper, so it will print 2 on one page.
Somehowe it now shows a page with or without 2x "scrap" even if one isn't scrap...
If both are not scrap then it will never show scrap.

Hope you understand what I mean...
 
you will need to use conditional formatting in this case, try making the colour of the background and foreground the same for the control if the checkbox is ticked...

--------------------
Procrastinate Now!
 
Crowley16
Your statement is not true of reports. The method I posted is a standard solution to this problem, recommended by DHookom amonst others, furthermore I tested the line before I posted and it works for me. It seems likely that there is some other problem.
 
[3eyes] ... Remou, your solution works perfect!
I had put it on the Report/On Page event...[flush]
Now I placed it on the Detail bar/On Format Event and it works perfectly...

Thanks!
(Damn I feel Noob [bomb])
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top