RE: Mandatory fields check Karl-Henry Martinsson 14.Jun.11 05:11 PM a Web browser Domino Designer -- Forms All ReleasesAll Platforms
You are mixing frontend (UI) and backend classes...
You are also making it much more complicated than it has to be.
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
If uidoc.FieldGettext("etype") = "" Then
MsgBox "Select item."
But I think the whole approach of throwing an error as soon as the user exit the field is not the best one. Why don't you display a warning (e.g. an icon) next to the field if it is blank/empty and required, and remove it when the field is filled in? You then put all the validation in QuerySave(). Preferably you also hide any save button you have in teh action bar until all required fields have been filled out.