Abort Item_Save and Item_Close

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
 
P

Pbeast

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top