Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2013
    Posts
    1

    Unanswered: How to highlight lateness?

    Hi,

    I have a MS access database consisting of the following fields:

    First Name
    Surname
    Employee number
    Date
    Actual start time
    Required start time

    All the employees start at either 8,8.15,8.30,8.45 or 9am.

    I am able to monitor what time they start but how do I highlight when they are late in Access? Basically if someone is due to start at 9am (required start time) and they arrive at 9.03am (Actual start time). How to I make the "Actual start time" highlighted? Also, if I want a query button to press to see who was late on a specific day what type of code would I use??

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Use the conditional format feature available in a form when it is in design view.
    - Right-click on the Textbox.
    - Select Conditional format.
    - Select "Expression" in the combobox.
    - Enter the expression. It should be something like:
    Code:
    [Actual start time] > [Required start time]
    - Select the color for the background when the condition is true.
    Have a nice day!

  3. #3
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    994
    Provided Answers: 2
    With regard to the second question,
    Code:
    SELECT
         [First Name]
    ,    Surname
    ,    [Employee Number]
    ,    [Date]
    FROM
         TableNameGoesHere
    WHERE
         [Date] = #[Enter target date]#
    AND
         [Actual start time] > [Required start time]
    10% of magic is knowing something that no-one else does. The rest is misdirection.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •