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

Subreport Events within a report

Status
Not open for further replies.

gillianleec

Technical User
May 7, 2003
48
US
I have a subreport that has an On Activate event that changes the fontsize depending on the number of records. It works great when I run the subreport but does not work when I run the report.

Private Sub Report_Activate()
Select Case Me.Countrec
Case Is > 4
Me.txtdocname.FontSize = 5
Case Is <= 4
Me.txtdocname.FontSize = 8
End Select

End Sub
 
Why would you ever choose the Activate event? Try the On Open or On Format of some section.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
I used the On activate event because it was looking for a count that occurred after the report was open. I tried the On open even and it said that there was no data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top