Formatting field in form or Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to make a date field that is past due "RED" if not "BLACK" and
"BOLDED". Need to know how to do this. Do you do this in a form or a query?
Can you do this in both query and form? Can you do this if you already have
formatting in the form?"(IIF[due]>date(),[Red],[Black])". Any help will be
greatly appreciated. Thank you.
 
I need to make a date field that is past due "RED" if not "BLACK" and
"BOLDED". Need to know how to do this. Do you do this in a form or a query?
Can you do this in both query and form? Can you do this if you already have
formatting in the form?"(IIF[due]>date(),[Red],[Black])". Any help will be
greatly appreciated. Thank you.

Well, you cannot do this in a query or in a table.
You can on a form or in a report.
If you have Access 2000 or newer you can use a control's Conditional
Formatting property.
Format + Conditional Formatting
Set Condition1 to Expression Is
Write (you did say Past Due didn't you?):
[Due]<Date()
Set the ForeColor to Red

You can also do this using code:
If [Due] < Date() Then
[Due].ForeColor = vbRed
Else
[Due].ForeColor = vbBlack
End If
 
Back
Top