Full Version: Text box behavior on a subreport
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
I am using the following code to change the backcolor of a textbox:
If IsNull(strEye) = True Then
        Reports![AdultChecklist_Individual]![sr_Diabetes].Report![r_HedisEyeExam].Report![MaxOfresult_dt].BackColor = 12632256
    End If

Trouble is...it doesn't work. strEye is the value of the textbox. If it is NULL, I want the textbox to show up gray. This will alert the user to fill in the value. If Not IsNull is TRUE, I can get the text box to change colors. This is driving me nuts!!!!!!!
Any thoughts?
You don't need to check if it is true or not. Either it is null or not.
So just do:
If IsNull(Me.strEye) Then...
On the other hand you can just use conditional formatting.
ACC2000 and higher has a feature called conditional formatting. No need for VBA.
Check this out:
conditional format reports
Good luck
This is perfect. Thanx.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.