Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Form Flashing Review Due Date 1

Status
Not open for further replies.

jrtaylor

Technical User
Jan 24, 2002
34
US
I have an Access Form that I am adding a date when the review of the hyperlinked data must be complete. Is there a way to have the date flash so it gets the reviewers attention or is there another way to draw attention to the due date on the form?

Thanks,

jrtaylor
 
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 :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top