Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Highlighting NEW Information on a Form

Status
Not open for further replies.

BellKev

Technical User
Jan 14, 2004
36
CA
Hello ...

I track many projects for my client using Microsoft access. Every friday I export my tables into a Microsoft excel file for their use (As that is what they are familar with). Traditionally they used to get new updates (I.E. Updated dates and comments) bolded for anything added within the past week. That was easy to do as you simply reset the spreadsheets every Monday.

That is not so easy to do with Access. Does anyone have any ideas as to how I could do this? Whether its some kind of auto format when I export ?? OR keeping it in Access but putting intelligence in the fields to be bolded when updated and for a week after that update??
 
select the control you want to highlight and then select Format | Conditional formatting.
 
Ok ... how do I set up the conditional formatting such that the field is bolded if it has been changed within the last week ??
 
Something like this on the form's open event. You may have to fiddle depending on the actual date format. Note that you won;t be able to do any conditional formatting to tables.

Dim d As Date
d = (Date - 7) ' 7 days
With Forms("YourFormName").Controls("YourCOntrolName").FormatConditions _
.Add(acFieldValue, acGreaterThan, d)
.BackColor = RGB(255, 255, 255)
.FontBold = True
.ForeColor = RGB(255, 0, 0)
End With

Cheers,
Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top