A
Adam Thwaites
I want to make several text boxes flash red on my form. The text box that
flashes is dependant on the value of a list box (lstTypeOfCall). I have the
code below for the Form Timer event and below that the module code to hold
the name of the control, either textSales, textService or textOther.
Private Sub Form_Timer()
Static lngCount As Long
Static conControl As Control
conControl = getControl()
If lngCount = 0 Then
lngCount = 8
End If
If conControl.BackColor = 255 Then
conControl.BackColor = 16777215
Else
conControl .BackColor = 255
End If
lngCount = lngCount - 1
If lngCount = 0 Then
Me.TimerInterval = 0
End If
End Sub
Module:
Private m_nControl As Control
Public Function setControl(nControl As Control)
m_nControl = nControl
End Function
Public Function getControl() As Control
getControl = m_nControl
End Function
and
Call setControl("lstTypeOfCall")
to send the value to the module.
As the moment none of it works as this is more sudo code than anything else
so I don't know if i'm using the correct references. Any ideas?
flashes is dependant on the value of a list box (lstTypeOfCall). I have the
code below for the Form Timer event and below that the module code to hold
the name of the control, either textSales, textService or textOther.
Private Sub Form_Timer()
Static lngCount As Long
Static conControl As Control
conControl = getControl()
If lngCount = 0 Then
lngCount = 8
End If
If conControl.BackColor = 255 Then
conControl.BackColor = 16777215
Else
conControl .BackColor = 255
End If
lngCount = lngCount - 1
If lngCount = 0 Then
Me.TimerInterval = 0
End If
End Sub
Module:
Private m_nControl As Control
Public Function setControl(nControl As Control)
m_nControl = nControl
End Function
Public Function getControl() As Control
getControl = m_nControl
End Function
and
Call setControl("lstTypeOfCall")
to send the value to the module.
As the moment none of it works as this is more sudo code than anything else
so I don't know if i'm using the correct references. Any ideas?