PostSave event problem

Good Morning,

This is the first time I have used the Postsave event and I am experiencing learning pains.

I have two fields on my main form, Parish1 and ParCont1. I will need these two fields for an agent that will be called later. Basically, I want to check to see if these two fields are equal after the user saves the form, and if they are not equal, put the value of Parish1 in the field ParCont1. On the first save the two text fields will not be equal, as ParCont1 will be empty and Parish1 will be populated by the user. The problem is that after I save the document and check the document properties ParCont1 is empty, it does not containt the value of Parish1. They are both text editable fields. Here is my code, can anyone offer suggestions?

Sub Postsave(Source As Notesuidocument)

Dim doc As NotesDocument

Set doc = Source.Document



Dim a$

Dim b$



a$ = Left$(Source.FieldGetText("Parish1"),2)

b$ = Source.FieldGetText("ParCont1")



If a$ >< b$ Then

	Call Source.FieldSetText("ParCont1", a$)

	

End If		

End Sub

Subject: PostSave event problem

The problem is you’re writing to a field after the “SAVE” event is done, hence, it’s NOT saving. Try using the querysave event instead.

ST

Subject: RE: PostSave event problem

Ohhhh!!! That is so obvious, I can’t believe I missed it!