Results 1 to 6 of 6
  1. #1
    teebumble is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    21

    highlighing records

    hi,



    I have a table with training records.

    I would like to have the overdue training records to be highlighted when I open the table. The table has many columns but the important ones are DateAssigned, DateCompleted, and LenDays.

    I was thinking of something along this line:

    On Current form

    if Me!DateCompleted is null then
    if Me!LenDays + Date() > Me!DateAssigned then
    (highlight the records)
    end if
    end if

    thank you!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Cannot do this directly on the table. So are you opening the table, or opening a form with the table as its RecordSource? Check out Conditional Formatting for controls.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    teebumble is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    21
    I am opening a form with the table as its RecordSource. I'll look into Conditional Formatting. Thanks. Will reply back after I give that a try.

  4. #4
    teebumble is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    21
    I am able to get the "if dateCompleted column is blank, then highlight the record" --- I wrote [DateCompleted] is null in the conditional formatting field.

    However, I am still having problem with "if assigned date + lendays has passed today's date, then highlight the record" --- I wrote [dateassigned] + [lendays] > [date] but that didn't work. Any suggestions?

    Thank you!

  5. #5
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    You would use this with the EXPRESSION IS set instead of VALUE IS:

    DateAdd("d", [DateAssigned], [lendays]) < Date()

    It would be less than today's date because it would not be overdue until it is behind today.

  6. #6
    teebumble is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    21
    Thanks June7 and Boblarson. It works now!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Appending records to other records
    By AVHer in forum Access
    Replies: 6
    Last Post: 07-28-2011, 11:57 AM
  2. Date function to query records and Sum records
    By sullynivek in forum Queries
    Replies: 0
    Last Post: 04-05-2011, 08:37 AM
  3. Replies: 10
    Last Post: 01-10-2011, 07:52 PM
  4. Replies: 7
    Last Post: 10-20-2010, 04:08 PM
  5. Replies: 3
    Last Post: 03-25-2010, 12:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums