打印开始后,不能设置控件来源属性
Private Sub 组页眉2_Format(Cancel As Integer, FormatCount As Integer)
Dim blm1 As String
Dim len1 As Integer
blm1 = [alltagname]
len1 = Len(blm1)
MsgBox (len1)
Select Case len1
Case 14
[blm].ControlSource = Mid([alltagname], 1, 11)
Case 13
[blm].ControlSource = Mid([alltagname], 1, 10)
Case 12
[blm].ControlSource = Mid([alltagname], 1, 9)
Case 11
[blm].ControlSource = Mid([alltagname], 1, 8)
Case 10
[blm].ControlSource = Mid([alltagname], 1, 7)
Case Else
[blm].ControlSource = Null
End Select
End Sub
运行报告说:“打印开始后,不能设置控件来源属性。”
可我还没打印啊,只是预览报表 DoCmd.OpenReport nowreport, acPreview
这问题怎么解决???请大家指教!