OK. This is how I would approach the task (other may think different though!). Firstly I'd create a dedicated view (possibly a hidden one) showing all documents created with that particular form. In simple terms, I'd then create a lotusscript agent (set to run each morning) looping through every document in the view and if the dates match, add this to the body of an email document.
I have included a script which I use to perform a similar task, but I report on anything within 2 days of the expiry date and use a variable in a different view to obtain the email address to send the notification to. I also send a link back to the document in question.
You should be able to modify this to get the results you want.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim mail As NotesDocument
Dim rtitem As NotesRichTextItem
Print "Automated Rental Advise Check Started."
' Set db = session.CurrentDatabase
Set db = New NotesDatabase( "", "xxx.nsf" )
Set view = db.GetView( "view1" )
Set doc = view.GetFirstDocument
Set mail = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( mail, "Body" )
' Set the current date and the range for anything in the next 2 days
currentdate = Cdbl( Date )
daterange = Cdat(currentdate + 2)
While Not (doc Is Nothing)
' Check whether the item has already been returned
If doc.columnvalues(3) = "" Then
' Check whether the due back date has been entered for this item
If doc.columnvalues(2) <> "" Then
' If the date is now, past or within 2 days then ensure it appears in the mail notification
If doc.columnvalues(2) <= currentdate Or (doc.columnvalues(2) > currentdate And doc.columnvalues(2) <= daterange) Then
Messagebox "The item '" & doc.columnvalues(3) & "' allocated to " & doc.columnvalues(5) & " should be returned on " & doc.columnvalues(2) & "."
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText( doc.columnvalues(3) & " allocated to " & doc.columnvalues(5) & " should be returned on " & doc.columnvalues(2) & ". ==>" )
Call rtitem.AppendDocLink( doc, "Rental Item" )
Call rtitem.AddNewLine( 1 )
flag = "Mail"
End If
End If
End If
Set doc = view.GetNextDocument( doc )
Wend
' Evaluate who to send the email to if the flag is set to Mail
If flag = "Mail" Then
mail.Subject = "Automated Rental Advise"
Set view = db.GetView( "Keywords" )
Set doc = view.GetFirstDocument
While Not (doc Is Nothing)
If doc.keyword(0) = "[Rental_Email]" Then
mail.SendTo = doc.values(0)
flag = "Send"
End If
Set doc = view.GetNextDocument( doc )
Wend
If flag = "Send" Then Call mail.Send( False )
End If
' A nice message to appear on the Notes log!
If flag = "Mail" Then
Print "Automated Rental Advise Check Completed - Mail Sent."
Else
Print "Automated Rental Advise Check Completed - No Mail Sent."
End If
Cheers.