|
9#
楼主 |
发表于 2007-8-12 14:10:16
|
只看该作者
Private Sub Form_Timer()
Dim objFrc As FormatCondition
I = I + 1
If I > 100 Then I = 1
''A框定义
If I Mod 2 = 0 Then
Me.日期.FormatConditions.Delete
Set objFrc = Me.日期.FormatConditions.Add(acExpression, , Me.日期 < Date - 60)
With Me![部材编码].FormatConditions(0)
.BackColor = vbRed
.FontBold = True
End With
With Me![部材名称].FormatConditions(0)
.BackColor = vbRed
.FontBold = True
End With
With Me![单位].FormatConditions(0)
.BackColor = vbRed
.FontBold = True
End With
With Me![总数].FormatConditions(0)
.BackColor = vbRed
.FontBold = True
End With
With Me![定单号].FormatConditions(0)
.BackColor = vbRed
.FontBold = True
End With
With Me![货架号].FormatConditions(0)
.BackColor = vbRed
.FontBold = True
End With
With Me![库存地点].FormatConditions(0)
.BackColor = vbRed
.FontBold = True
End With
With Me![总箱数].FormatConditions(0)
.BackColor = vbRed
.FontBold = True
End With
With Me![日期].FormatConditions(0)
.BackColor = vbRed
.FontBold = True
End With
End If
If I Mod 2 = 1 Then
Me.日期.FormatConditions.Delete
Set objFrc = Me.日期.FormatConditions.Add(acExpression, , Me.日期 < Date - 60)
With Me![部材编码].FormatConditions(0)
.BackColor = vbWhite
.FontBold = False
End With
With Me![部材名称].FormatConditions(0)
.BackColor = vbWhite
.FontBold = False
End With
With Me![单位].FormatConditions(0)
.BackColor = vbWhite
.FontBold = False
End With
With Me![总数].FormatConditions(0)
.BackColor = vbWhite
.FontBold = False
End With
With Me![定单号].FormatConditions(0)
.BackColor = vbWhite
.FontBold = False
End With
With Me![货架号].FormatConditions(0)
.BackColor = vbWhite
.FontBold = False
End With
With Me![库存地点].FormatConditions(0)
.BackColor = vbWhite
.FontBold = False
End With
With Me![总箱数].FormatConditions(0)
.BackColor = vbWhite
.FontBold = False
End With
With Me![日期].FormatConditions(0)
.BackColor = vbWhite
.FontBold = False
End With
End If
End Sub
可以实现了
上述代码给大家分享一下 |
|