Date flag in Access 2003

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mbsevans
    New Member
    • Oct 2006
    • 6

    Date flag in Access 2003

    New Access user here. I have a simple datebase containing employee information. I have 3 differents dates which reflect the DUE date for a qualification that each employee needs in order to continue working on the job site.
    I have looked at other postings but see nothing similar to what I am needing.

    I need to simply have a flag (colour change or text) to alert a user that the current date is within a 30 day window prior to the due date.
    In other words a warning that warns when that employee is 30 days away from requalification in each of the 3 categories.

    Someone suggested just running a query and find dates between this date and 30 days from now, but this seems kinda silly.
    Then again...what do I know?
    Thanks in advance.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32636

    #2
    It's not very clear exactly what you want but, if I guess that you want something to show on a form which would enable the operator to review each record, then you could tie the form to a query rather than the underlying table.
    One field on the form would be a boolean indicating whether or not the current user is within 30 days or not.

    Alternatively, something like the following could be used after setting the OnCurrent to this event procedure :-

    Code:
    Private Sub Form_Current()
        If Me!Date < DateAdd("d",30, Date()) Then
            Me!Name.BackColor = 255
        EndIf
    End Sub

    Comment

    Working...