marnold37341
Programmer
I want to make the textbox black if the value of the Control Source = 0. Following the Help example for BackColor, here's what I did:
Has Module for Report Properties = Yes
TextBox Name = txtSSRSMon
TextBox Control Source = SSRSMon
The VB Module reads as follows:
***********
Option Compare Database
Sub Form_Current()
Dim lngBlack, lngWhite, varSSRSMon As Long
If Not IsNull(Me!txtSSRSMon.Value) Then
varSSRSMon = Me!txtSSRSMon.Value
Else
Exit Sub
End If
Debug.Print varSSRSMon
lngBlack = RGB(0, 0, 0)
lngWhite = RGB(255, 255, 255)
If varSSRSMon = 0 Then
Me!txtSSRSMon.BackColor = lngBlack
' Me!txtSSRSMon.Value = Null
Else
Me!txtSSRSMon.BackColor = lngWhite
End If
End Sub
*****************
I even put the Debug.Print staement in to atempt verifying the module was executing. I get no results, the Immediate window has no data from the Debug.Print statement, and the value of the field (0) is still visible, rather than "blacked" out.
Any help????
Mickey Arnold
marnold37341@yahoo.com
Has Module for Report Properties = Yes
TextBox Name = txtSSRSMon
TextBox Control Source = SSRSMon
The VB Module reads as follows:
***********
Option Compare Database
Sub Form_Current()
Dim lngBlack, lngWhite, varSSRSMon As Long
If Not IsNull(Me!txtSSRSMon.Value) Then
varSSRSMon = Me!txtSSRSMon.Value
Else
Exit Sub
End If
Debug.Print varSSRSMon
lngBlack = RGB(0, 0, 0)
lngWhite = RGB(255, 255, 255)
If varSSRSMon = 0 Then
Me!txtSSRSMon.BackColor = lngBlack
' Me!txtSSRSMon.Value = Null
Else
Me!txtSSRSMon.BackColor = lngWhite
End If
End Sub
*****************
I even put the Debug.Print staement in to atempt verifying the module was executing. I get no results, the Immediate window has no data from the Debug.Print statement, and the value of the field (0) is still visible, rather than "blacked" out.
Any help????
Mickey Arnold
marnold37341@yahoo.com