Public Function SetRequiredColor(DataObject As Object, _
Optional RequiredMark As String = "<Required>") As String
On Error Resume Next
Dim ctl As Control
For Each ctl In DataObject.Controls
If InStr(1, ctl.Tag, RequiredMark) > 0 Then
ctl.BackColor = RGB(135, 206, 250)
If ctl.Controls.Count > 0 Then ctl.Controls(0).ForeColor = RGB(255, 0, 0)
End If
Next
SetRequiredColor = "RGB(135,206,250)"
End Function
Access软件网交流QQ群(群号:198465573) |