以下代码加在“人员情况 子报表”中可以实现正式职工和临时工的字体差别。
Private Sub 主体_Print(Cancel As Integer, PrintCount As Integer)
If DLookup("[编制]", "人员情况", "[姓名]='" + Me.姓名 + "'") = "正式" Then
Me.[姓名].FontName = "宋体"
Me.[姓名].FontWeight = 700
Else
Me.[姓名].FontName = "仿宋_GB2312"
Me.[姓名].FontWeight = 400
End If
End Sub