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!

Changing content of label in code (report_page)

Status
Not open for further replies.

arboral1

Programmer
Mar 24, 2004
1
BE
I have a report that contains 20 record per page. When i'm trying to print a report that contains 40 record, i can't get the content of the label to change (alltought the number of pages equals 3, i force it by checking page -1.
When i debug the code and check the content of the label in immediate it has the right value but when previewing and printing it does not..can someone help me out?

code:
Private Sub Report_page()
If totpaginas = 1 Or Report.Page = totpaginas - 1 Then
Report.Controls("tit1").Caption = "Totaal"
Else
Report.Controls("tit1").Caption = "Overdracht"
End If
end sub
 
Try putting the above code in the OnFormat of the Detail Section. It is here that I usually make specific controls and/or labels visible and invisible.

Post back if you need more discussion.

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


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top