Oct 6, 2003 #1 sqlJunior Technical User Sep 22, 2002 123 TH I have a report with a column in which I need to reduce the font size from 8 to 7 when the amount of characters in the longest record exceeds 28. How can I write a statement that will achieve this.
I have a report with a column in which I need to reduce the font size from 8 to 7 when the amount of characters in the longest record exceeds 28. How can I write a statement that will achieve this.
Oct 6, 2003 #2 HomeALone Instructor Jul 20, 2001 110 US Try this in the On_Format event of the report Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Len([FieldName]) > 28 Then Me.FieldName.FontSize = 7 Else Me.FieldName.FontSize = 8 End If End Sub Upvote 0 Downvote
Try this in the On_Format event of the report Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Len([FieldName]) > 28 Then Me.FieldName.FontSize = 7 Else Me.FieldName.FontSize = 8 End If End Sub
Oct 6, 2003 Thread starter #3 sqlJunior Technical User Sep 22, 2002 123 TH Thanks HomeAlone You've solved my problem. I found I has to use Me! instead of Me. and it works perfectly. If Len([LineNo]) > 28 Then Me!txtLineNo.FontSize = 7 Else Me!txtLineNo.FontSize = 8 End If Really appreciate your help SqlJunior Upvote 0 Downvote
Thanks HomeAlone You've solved my problem. I found I has to use Me! instead of Me. and it works perfectly. If Len([LineNo]) > 28 Then Me!txtLineNo.FontSize = 7 Else Me!txtLineNo.FontSize = 8 End If Really appreciate your help SqlJunior