Changing Field Properties using VB Scrips

G

Galsaba

How can I change field properties, let's say border style?
For example, if Date > Today then the border style of the Date
field will be solid, otherwise, the border will be transparent.
Thanks,
Lynn
 
D

Duane Hookom

If you are using Access 2000 or greater, check out Conditional Formatting.
If earlier version, use code in the on format event of the section
containing the control like:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.txtDate > Date Then
Me.txtDate.BorderStyle = 1 'solid
Else
Me.txtDate.BorderStyle = 0 'transparent
End If
'...
 
Top