You said the sample Form worked on your system so you should be able to
get the Report working as well.
I just saved the Sample Form as a Report.
Copied the Form's Load event to the Report's Open event.
Copied the Form's Current event to the Report Detail Section's Format
event and everything worked fine.
Here is the code behind my Report.
Option Compare Database
Option Explicit
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim lngTextHeight As Long
With Me.txtExtraInfo
' Copy the original Font height from the Tag property
.fontsize = .Tag
Do While .fontsize > 2
lngTextHeight = fTextHeight(Me.txtExtraInfo)
' Does text fit? If yes then exit
If lngTextHeight < .Height Then Exit Do
' Decrease font height
.fontsize = .fontsize - 1
Loop
End With
End Sub
Private Sub Report_Open(Cancel As Integer)
' Copy the TextBox default Fontsize to its Tag property.
Me.txtExtraInfo.Tag = Me.txtExtraInfo.fontsize
End Sub
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.