The following event handler verifies that required fields are filled in, and displays a dialog box detailing any missing data.

function Rowset_canSave()

local cErrors 

cErrors = "" // String for errors 

if empty( this.fields[ "Last name" ].value ) 

cErrors += "- LAST NAME cannot be blank" + chr(13) 

endif 

if empty( this.fields[ "ZIP" ].value ) 

cErrors += "- ZIP CODE cannot be blank" + chr(13) 

endif 

if "" # cErrors 

msgbox( "Can't save current entry because:" + chr(13) + cErrors, "Bad entry", 48 ) 

return false 

else 

return true 

endif