Rocky Smolin
rockysmolin at bchacc.com
Thu Apr 9 12:55:24 CDT 2009
That would be good for a report. But it don't think you can make it work
for a continuous form.
Rocky
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester
Sent: Thursday, April 09, 2009 10:49 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Empty Field Label
I don't if this will help you or give you any ideas but I used this code to
color text in text boxes in the detail section of a report.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Last_IT_Date < Date - 10 Then
Last_IT_Date.ForeColor = vbRed
Else
Last_IT_Date.ForeColor = vbBlack
End If
If Stat_Code = "WI" And Lin_pres > 1850 Then
Lin_pres.ForeColor = vbRed
ElseIf Stat_Code = "WI" Then
Lin_pres.ForeColor = vbBlack
End If
If Stat_Code = "CI" And Lin_pres > 2180 Then
Lin_pres.ForeColor = vbRed
ElseIf Stat_Code = "CI" Then
Lin_pres.ForeColor = vbBlack
End If
End Sub
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: Thursday, April 09, 2009 11:21 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Empty Field Label
Dear List:
I think it was Gustav that turned me on to putting some text into an empty
bound text box using: @;"Select Matter "[Red] which displays the words
'Select Matter' in red if the field bound to the text box is null. Works
great in a continuous form.
My client now wants to extend this to combo boxes. I tried it but it didn't
work. Probably because the first column of the combo box is zero width -
containing the PK. Is there a way to use @;"Select Matter "[Red] so that it
will display in the second column of the combo box?
He also wants to extend this technique to text boxes that already have a
format. For example, the 'Date Worked' field has ddd d-mmm-yyyy for a
format. If the field does not have a date he'd like the words 'Date Worked'
to appear in red. But if I paste @;"Date Worked"[Red] into the format
property it'll override the date format when there's a date in the field.
Any way to finesse that one?
MTIA,
Rocky Smolin
Beach Access Software
858-259-4334
www.e-z-mrp.com <http://www.e-z-mrp.com/>
www.bchacc.com <http://www.bchacc.com/>
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com