Calculate a notification date that is X number of days prior to a Due Date with the user to provide the X value.
I created 3 fields.
One called DueDate that was an editable Time field set to Date Only and Defaulted to Today.
A second called Number that was an editable number field, no decimals and Defaulted to 0.
A third field "AdjustedDate that is a Time field, set to Date only and Computed to itself.
I placed the code below in the Exit event of the Number field. Whenever someone moves through that field it recalulates the AdjustedDate field based on the DueDate adjusted by the Number field value.
An agent looks to the AdjustedDate field and on that date, mails a reminder notice to the appropriate person advising that their DueDate is approaching.
Sub Exiting(Source As Field) Dim ws As New NotesUIWorkspace Dim uidoc As NotesUIDocument Dim doc As NotesDocument Set uidoc = ws.CurrentDocument temp = uidoc.FieldGetText("Number") temp2 = temp * -1 Set doc = uidoc.Document Dim tDate As New NotesDateTime(doc.DueDate(0)) Call tDate.AdjustDay(temp2) doc.AdjustedDate = tDate.DateOnly End Sub