I upgraded an existing database and changed some of the original code to get the desired functionality in ND6. However I’ve run into a problem with an input validation used on my form. The code basically traps for a Subject field, and if one is not present it alerts the user and puts focus back on the Subject field. (I’ll attach the code below) However, if a user opens the form, then decides not to compose a memo, there is no way to escape out of the form without putting a value in the Subject field, and this is a deal breaker for the user group. Any suggestions on a workaround?
Here’s the code in question:
Sub Queryclose(Source As Notesuidocument, Continue As Variant)
If (source.FieldGetText("Subject") = "") Then
Msgbox "You must enter a 'Subject'", 0, "'Subject' Field is Required"
Call Source.gotofield("Subject")
continue = False
Exit Sub
End If
If Trim$(ThisDoc.EnterSendTo(0)) = "" And Trim$(ThisDoc.SendTo(0)) = "" Then
Msgbox "Threre are no recipients specified in the 'To' field", 0, "'To' Field is Required"
Exit Sub
End If
Set ThisDoc = source.document
Call cMemoObject.QueryClose(Continue)