Blinking field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to make a field in a form to flash or blink
when searching for a record? And if it can be done can it
be done on a criteria i.e. if field is not null flash/blink

Thanks in advances
 
In the Declarations section declare a variable...
Private DoBlink As Boolean

On the event you want to trigger the Blinking set the DoBlink variable to
True
IE:
Private Sub DoSearch()
On Error Goto ErrTrap:
DoBlink = true
''\\ CODE TO DO SEARCH GOES HERE
err_Exit:
DoBlink = False
Exit Sub
errTrap:
''\\\CODE TO HANDLE ERROR GOES HERE
Resume err_Exit
End Sub

Set the Forms Timer Interval to 1000 (1 second)

On the Form_Timer Event...

Private Sub Form_Timer()
If DoBlink = True then
If Me.MyTextBox.BackColor = vbWhite Then
Me.MyTextBox.BackColor = vbYellow
Else
Me.MyTextBox.BackColor = vbWhite
End If
End If
End Sub
 
Back
Top