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

Access reports 2

Status
Not open for further replies.

SOAPII

MIS
Apr 21, 2004
1
US
How can I supress the printing of a line on a report based on a field in the database? I have supressed the printing of the information usinng the IIf but I get a blank line on the report. Any help would be welcomed.
 
You would receive more help, if your subject line was more detailed on what issue it is that your having. I.E.:

"Supress Printing of A Line..."

I'm assuming that you have created your report with the line it, using the toolbar to draw it. In code you can set the line's visibilty property according to what it is you want it to react to.

If IsNull (me.field) then
Me.Line1.Visible = False
End if

Hope this helps.

S.C. Albertin
Database Administrator/Newbie Tech
United Way

Help me to find my way, so that I may help others find theirs...
 
The command DoCmd.CancelEvent as made just for this purpose. Check out ACCESS Help for a detailed explanation.

Code:
If Me![[red][i]field_controlname[/i][/red]] = [i]condition[/i] Then
    DoCmd.CancelEvent
End If

Put this code in the Detail Sections On Format event procedure and the when the IF condition is true the Detail Section will not process and print.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top