Counter not working

Hi everybody,I have a frameset, this frameset include 5 forms.

and this forms must have a unique counter field.

Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)

isnew=isnewdoc	

End Sub

Sub Querysave(Source As Notesuidocument, Continue As Variant)

If isnew Then

	Dim counter As String

	counter=Getcounter("FirstForm")

	Call source.FieldSetText( "formcounterfield", counter )

End If

End Sub

This code running only first form. But, this code not running other forms.

I debugged and I saw Queryopen is working (isnew is true) but Querysave is not working (isnew (in Querysave) is empty.)

Why? any idea? or different solution?

Best regards.

Subject: Counter not working

I solved.Sub Querysave(Source As Notesuidocument, Continue As Variant)

If Source.IsnewDoc Then

Dim counter As String

counter=Getcounter(“FirstForm”)

Call source.FieldSetText( “formcounterfield”, counter )

End If

End Sub