In a DB I have a report that is opened from a Button. No problem with this part. How ever some fields on the report are populated from a query. I have one text field on the report called Combined2, where the text in the field can vary in length up to about 100 characters. The field is not physically long enough for the 100 characters. I cannot use the Can Grow Format because it grows down and interferes with another field. So, I want to control the size of the font. I have calculated the max length of the field size = 82 characters.
In my internet research I have encounter this code:
When I put this code in the Report Current event it does not work.
Is what I am trying to do even possible? If so, what report event should I use to trigger the setting of the font size.
Or,is there a better way to do this?
Thanks,
John
In my internet research I have encounter this code:
Code:
If (Len([Combined2] < 82)) Then
MsgBox Len([Combined2])
With Me.[Combined2:]
.SetFocus
.FontSize = 11
End With
Else
With Me.[Combined2:]
.SetFocus
.FontSize = 8
End With
End If
When I put this code in the Report Current event it does not work.
Is what I am trying to do even possible? If so, what report event should I use to trigger the setting of the font size.
Or,is there a better way to do this?
Thanks,
John