OnTimer function

F

Freehal04

I have a field that calculates a date that is 10 earlier than a due date for
a report. I was wondering what an expression would look like that would
alert the user with a dialog box or something that says "hey your report is
due."
The idea is when they open the form any time during the 10 days they will be
alerted. The field is called 10dayalert, so I was wondering if the
expression would have to be tied to the due date field. I'm terrible at
writing expressions so any help would be greatly appreciated.
 
A

Al Campagna

Use the form's OnCurrent event, to fire each time you browse to each record.
If Date() >= DateAdd("d", -10, [10DayAlert]) Then
MsgBox "Report is due."
End If

If you have multiple records that may be due at one time, I'd run a query based on that
same calculation, or develop a report to indicate which records need reporting upon.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Top