Changing Field Properties using VB Scrips

  • Thread starter Thread starter Galsaba
  • Start date Start date
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
 
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
'...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top