too many characters in an ab box

D

Database User

I have a field in a report of =[Student Name] & " " & [Student Surname] I
want to say that if there are more than 20 characters in that text box then
make the point size a little smaller. I know the lenn formula for the first
part but how do i tell access to make the font (point size) smaller. how
should the formula look

thanks so much!
 
O

Ofer

You can try this, in the OnFormat event of the section where the fields are
located, add the code

If Len(Me.[Student Name] & Me.[Student Surname]) > 19 Then
Me.[Join FieldName].FontSize = 8
Else
Me.[Join FieldName].FontSize = 12
End If
 
Top