Querysave on subform cannot stop save?

I have a subform with code similar to the following in the QuerySave (remember, this is the Querysave on the SUBForm):

Continue = True

Dim assignee as string

assignee = Source.FieldGetText(“Assignee”)

if assignee = “Unassigned” or assignee = “” then

Continue = False

msgbox “Must assign this document”

Call Source.FieldGoTo(“Assignee”)

end if

The problem is that the document saves anyway. It will prompt the user with the msgbox, and go to the field, but then if the user tries to save again, and gets the prompt, and

clicks OK. Then he tries to close the doc, and is prompted with “Do you want to save this document” and he says “NO”.

The document closes. Good. Now I look and see that the document was saved anyhow. What gives?

I would think that me setting Continue to FALSE would have not allowed this document to be saved anywhere. But somehow it did. Any ideas on where this could have occurred?

Thanks.

By the way, this is a purchased software, and I notice a line on a CLOSE button on a form that says:

FIELD SaveOptions:=@DeleteField

I am trying to figure out exactly what this accomplishes. I understand it deletes the SaveOptions field (item?) but just figuring this is a creative solution to something and was wondering if anyone has ever used such logic.

Subject: Querysave on subform cannot stop save?

I don’t agree with the Order that these events are executed in but we ran into a similar problem several years ago. I can’t remember the exact results that we got but I’m pretty sure that the Subform Querysave executes After the form QuerySave. What we did was put a message in the QueryOpens, QuerySaves etc and recorded the sequence. So trying to stop the save from the Subform Querysave wont work. I believe the logical way to evaluate is from the outside in on opening and from the inside out of leaving but I don’t believe that is the way it works, and of course if Lotus changed the sequence now the screams would be deafening.

Just put a message in the form QuerySave to confirm this, but I’m pretty sure (but my memory isn’t what it used to be and it was almost 10 years ago that we went through this).

Subject: Querysave on subform cannot stop save?

By the way, this is a purchased software, and I notice a line on a CLOSE button on a form that says:

FIELD SaveOptions:=@DeleteField

I am trying to figure out exactly what this accomplishes. I understand it deletes the SaveOptions field (item?) but just figuring this is a creative solution to something and was wondering if anyone has ever used such logic.

Item is the correct term. A field is a design element on a form; an item is the packet of data saved in the document as a consequence of having been saved via that form.

A SaveOptions field is used to control the behavior of the QuerySave event. A value of “1” or 1 means the form always saves, a value of “0” or 0 means the form never saves. Does your form have a SaveOptions field on it?

SaveOptions fields are tricky and should be used sparingly, if ever.

It is not absolutely necessary to have a SaveOptions field on the form to create this behavior. You can insert a SaveOptions item and it will do the same thing, as in

FIELD SaveOptions := “1”;

or

FIELD SaveOptions := @DeleteField;