You can use the form's timer event. Here is sample code:
Sub Form_Load()
' Sets the time interval to 1 second
Me.TimerInterval = 1000
End Sub
Sub Form_Timer()
Static intCount As Integer
Static intFlash As Integer
intCount = intCount + 1
' intFlash is equal to either 0 or -1
' datDate is the name of the date field
' on the form
If intFlash Then
' Change Fore and Back Colors
datDate.ForeColor = vbRed
datDate.BackColor = vbYellow
Else
' Change Fore and Back Colors
datDate.ForeColor = vbBlack
datDate.BackColor = vbWhite
End If
intFlash = Not intFlash
' Stop the flashing after 10 seconds
If intCount = 10 Then
' Reset the form's TimeInterval to 0
Me.TimerInterval = 0
' Change Fore and Back Colors
datDate.ForeColor = vbBlack
datDate.BackColor = vbWhite
End If
End Sub
John Ruff - The Eternal Optimist
