Flagging when certain criteria are met???

Adrianna

Registered User.
Local time
Yesterday, 23:17
Joined
Oct 16, 2000
Messages
254
I'm trying to flag certain fields that have past their due date. I have to make the "expired" fields (which are date fields), stand out so that it is obvious that they are past due.

I'd like to know if there is a way to
If [MyDateField] > Date() Then
BOLD, and increase the font

I know...someone will suggest that I run a report for expired dates, but I have that. I just want to be able to have the overall summary report show that various dates have been past due.

I should note that each record can have three or four past due dates in them.

Any Ideas??
 
Found this in a previous post from "Phillip".

You could add a line of code to the OnFormat event of the detail section.
For example:
Me!SpecificLine.BorderColor = Iif(Me!SpecificField = CertainValue, SpecialColor, RegularColor)


If this doesn't work, try other solutions. Search this forum for the phrase conditional format.

Good Luck
Tess
 
Adrianna, Here are a couple of ideas for you.
The first one take a field called CE (Critical Element) and reformats it if the value is "Y"

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
' Make CRITIAL ELEMENT Bold, 12 point and Red if CE is Y (Yes).

Const conNormal = 400
Const conHeavy = 900 ' Extra Bold

' If the CE is Y display the CE field as BOLD
If CE = "Y" Then
CE.FontWeight = conHeavy
CE.FontSize = 12
CE.FontUnderline = True
CE.ForeColor = vbRed
Else
CE.FontWeight = conNormal
CE.FontSize = 10
CE.FontUnderline = False
CE.ForeColor = vbBlack
End If

End Sub
*************************************************************************
This section of code I use to display a hidden label called ExpiredLabel,
the text of which is "Suspense EXPIRED !!"

Hope this helps !!


Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
' When formatting each issue record, display the labels for
' the resolution fields only if the issue is resolved.

Dim blnResolved As Boolean
Dim blnExpired As Boolean

' Determine whether the DateResolved field has a value.
blnResolved = Not IsNull(DateResolved)

' Set the Visible property for the three labels.
DateResolvedLabel.Visible = blnResolved
ResolutionLabel.Visible = blnResolved
ResolvedByLabel.Visible = blnResolved

If Me![CurrentDate] > Me![SuspDate] Then
Me![ExpiredLabel].Visible = True
Else
Me![ExpiredLabel].Visible = False
End If

End Sub

LABEL INFORMATION
Name: ExpiredLabel
Caption: Suspense EXPIRED !!
Visible: No
Back Style: Transparent
Back Color: 16777215
Forecolor: 255
Border Style: Transparent
 

Users who are viewing this thread

Back
Top Bottom