Abort Item_Save and Item_Close

  • Thread starter Thread starter Kristian
  • Start date Start date
K

Kristian

Hi,
If a custom field in a Contact form is empty I want to
-show a message and
-have the form stay open unsaved
Cancel=True in Item_Save doesn't seem to do the trick.

Any tip greatly appreciated!
Kristian
 
THE ITEM_WRITE() IS FIRED WHEN A USER SAVES THE FORM. USE
THE FOLLOWING CODE TO MODIFY ITS EXECUTION. REPLACE THE
PROPER PAGES AND FIELDS WHERE NECESSARY.

Function Item_Write()

If Item.GetInspector.ModifiedFormPages("YOUR
PAGE").Controls("LAST_NAME").Value = "" Then

MsgBox "Nothing was Saved Because Required Fields were
Incomplete", _
vbCritical

Item_Write = False

Exit Function
End IF
End Function
 
Back
Top