Hello, i got a problem that i can’t solved like i want, hope you can help me
The field has a Date/Time type
The option : “Run Exiting/OnChange events after value change” is checked
The Exiting code is :
Dim w As New NotesUIWorkspace
If w.CurrentDocument.FieldGetText(“DateField”) <> “” Then
If Cdat(w.CurrentDocument.FieldGetText("DateField")) < Cdat(Format(Now(),"DD/MM/YYYY")) Then
Call w.CurrentDocument.FieldSetText("DateField", Format(Now(),"DD/MM/YYYY"))
w.CurrentDocument.Refresh
End If
End If
This code works like i want when :
You edit the document, the you set a date wich is before Today … the date of today is automaticaly set …
But, in a special case wich is :
You edit the document, then you save the document without closing it, then if you editing the document again, if you try to modify the field and set a date before today, the Exiting code isn’t execute.
Here is the formula of my Save Button :
FIELD SaveOptions := “1”;
@If(@Command([FileSave]);@Do(
FIELD SaveOptions := “0”;
@Command([EditDocument]));@Return(“”))
Here is the formula of my Edit Button :
@Command([EditDocument])
Thanks for your help, and have a nice day