Formatting Reports at run time

  • Thread starter Thread starter TC
  • Start date Start date
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.
 
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.
 
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"
 
Back
Top