By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,326 Members | 2,726 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,326 IT Pros & Developers. It's quick & easy.

Date flag in Access 2003

P: 6
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.
Oct 25 '06 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 31,434
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 :-

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.     If Me!Date < DateAdd("d",30, Date()) Then
  3.         Me!Name.BackColor = 255
  4.     EndIf
  5. End Sub
Oct 25 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.