|
8#
楼主 |
发表于 2021-5-24 15:39:35
|
只看该作者
本帖最后由 付谦 于 2021-5-24 15:46 编辑
我电脑上运行是好的,我的压缩文件为WINRWR6.0 64位
代码如下,现象见前介绍
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim CtlDetail As Control
Dim intLineMargin As Integer
intLineMargin = 60
For Each CtlDetail In Me.Section(acDetail).Controls
With CtlDetail
If CtlDetail.NAME <> "Memo" Then
Me.Line ((.Left + .Width + intLineMargin), 1)-(.Left + .Width + _
intLineMargin, Me.Height)
End If
End With
Next
With Me
Me.Line (1, 1)-Step(.Width, .Height), 1, B
End With
Set CtlDetail = Nothing
End Sub
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim P As String
Dim PP As String
Dim N As Long
Me.TEXT0.Width = 0
TEXT0.TopMargin = 0
Me.TEXT0.Height = 660
N = 0
If Len(Me.照片) > 0 Then
TEXT0.Left = 2787
Me![img0].Width = 750
Me![img0].Height = 960
Me![TEXT1].Height = 960
Me![TEXT2].Height = 960
Me.TEXT0.Width = 6310
'' PP = DLookup("姓名", "谱打印临时表", "族人代码=" & DLookup("Min([族人代码])", "谱打印临时表"))
'' P = CurrentProject.Path & "\" & Forms!家谱管理系统.Text4 & "氏照片\" & Me.照片.Value
Me![img0].Picture = CurrentProject.Path & "\" & Me.照片.Value
N = Me.字数 \ 28 + IIf(Me.字数 Mod 28 > 0, 1, 0)
If N = 1 Then
TEXT2.TopMargin = 285
TEXT1.TopMargin = 165
TEXT0.TopMargin = 285
ElseIf N = 2 Then
TEXT2.TopMargin = 190
TEXT1.TopMargin = 100
TEXT0.TopMargin = 100
ElseIf N = 3 Then
TEXT2.TopMargin = 320
TEXT1.TopMargin = 320
TEXT0.TopMargin = 0
End If
Else
Me![img0].Width = 0
Me![img0].Height = 660
Me![img0].Picture = ""
Me.TEXT0.Left = 1870
Me.TEXT0.Width = 7200
Me![TEXT0].Height = 660
N = Me.字数 \ 32 + IIf(Me.字数 Mod 32 > 0, 1, 0)
If N = 1 Then
TEXT2.TopMargin = 90
TEXT1.TopMargin = 0
TEXT0.TopMargin = 180
ElseIf N = 2 Then
TEXT2.TopMargin = 90
TEXT1.TopMargin = 0
TEXT0.TopMargin = 30
ElseIf N = 3 Then
TEXT2.TopMargin = 285
TEXT1.TopMargin = 165
TEXT0.TopMargin = 0
End If
End If
End Sub
|
|