Formatting Reports at run time

T

TC

how would one go about formating a report a runtime. I have a sub report
and depending on how many records are returned i want to change the font
size of the text field.
 
M

Marshall Barton

TC said:
how would one go about formating a report a runtime. I have a sub report
and depending on how many records are returned i want to change the font
size of the text field.

If I understand the question?? you can use the subreport's
header section's Format event to change the detail control's
font size:

If Me.txtRecords > 5 Then
Me.textbox1.FontSize = 10
Else
Me.textbox1.FontSize = 12
End If

where txtRecords is the name of a text box in the report
header section with the expression =Count(*)

Note that this will not make the subreport take up less
space unless you also set the detail controls' and sthe
detail section's CanShrink to Yes.
 
D

Douglas J. Steele

Marsh told you:

where txtRecords is the name of a text box in the report
header section with the expression =Count(*)


--
Doug Steele, Microsoft Access MVP



TC said:
how do I get the reports record count.

What are you refering to with "txtRecords"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top