1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Function MemoSplitter(strReportName As String, _
strFieldName As String, lngMemoLength As Long, haut As Integer)
Dim NewControl As Control
Dim intLoopCount As Integer
Dim gauche, largeur, hauteur As Integer
gauche = 130
largeur = 8800
hauteur = 2170
For intLoopCount = 0 To lngMemoLength / 250
Set NewControl = CreateReportControl(strReportName, _
acTextBox, acDetail, , "", gauche, haut, largeur, hauteur)
NewControl.Name = intLoopCount & "MemoText"
NewControl.ControlSource = "=Mid([" & _
strFieldName & "]," & 250 * intLoopCount + 1 _
& ",250)"
haut = haut + (hauteur + 20)
Next intLoopCount
End Function |
Partager