Lotus Notes FAQ Visit Our Sponsor!

How do you force a user to use a button to save a form?

This code satisfies three requirements:
1) prevent users from saving a form via menu or keyboard controls; only the action button can be used for saves
2) only use ONE field to accomplish to keep application overhead down
3) depending on a value in a status field, action button should issue file save or file save new version

AllowSave field: Editable, Text, Hidden

  Default value = "0"
  Validation = @If(AllowSave = "0"; @Failure(...); @Success)

Action Button:

  FIELD AllowSave := "1";
  @If(Status = "Open";

Form PostOpen Event:

  FIELD AllowSave := "0";
  @SetField("AllowSave"; "0")

Applies to Notes Versions: 4 4.5 4.6 5
Last Modified: October 31, 1998