"a stored form cannot contain computed subforms" - Please Help

Hi there,

We have recently migrated to Notes 6.5.1 from R5 and i have LS that sends a mail on a button click. This code works fine with R5 but when we try to open the mail in 6.5.1 we get the following message :

“A Stored form cannot contain computed subforms”

Here is the code i am using to send the mail :

Sub Click(Source As Button)

'Declare Variables



Dim s As New NotesSession	

Dim ws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim doc As NotesDocument

Dim maildoc As NotesDocument

Dim db As NotesDatabase

Dim rtf As NotesRichTextItem

Dim TheUser As String

Dim Currentdb As NotesDatabase

Dim view As NotesView



'Instantiate Objects / Initialise or Set Variables



Set uidoc = ws.CurrentDocument

Set maildoc = uidoc.document

Set db = s.GetDatabase("","")

TheUser = uidoc.FieldGetText("ErrUser")

Set Currentdb = s.CurrentDatabase

Set view = Currentdb.GetView( "Log An Error" )



'Setting the NewDoc field to No



uidoc.FieldSetText("ErrNewDoc"),"No"



'MailSend Code



Call db.OpenMail

Set doc = db.CreateDocument

With doc

	.Form = "Memo"

	.SaveMessageOnSend = False

	.SendTo = "Jamie Grant"

	.Subject = "CRM User Error"

	Set rtf = .createrichtextitem("Body")

	Call rtf.AppendText ("A TCC operative ( " & TheUser & " ) has made an error in the CRM. Please click the following link for more details ------> ")

	Call rtf.AppendDocLink( maildoc, currentdb.Title )		

	Call .send(True)

End With



Call uidoc.save

Call uidoc.refresh

End Sub

If anyone can shed any light on this - that would be gr8. I have already searched the forum on this, and nothing really hit it on the head.

Thanks

Jamie Grant

Subject: “a stored form cannot contain computed subforms” - Please Help

When the code says:

Call .send(True)

that means the form should be stored with the document. Your “Memo” form must contain computed subforms, and the system is complaining about that. The reason it complains is because the subforms get included with the stored form, but it has no way of knowing which subforms to include since they are computed.

Your memo form may not have contained computed subforms in R5, and that is why it worked, but I also think the restriction was not there in R5, so if a computed subform failed, it just failed. Honestly, I liked that better, although I understand why it makes sense to add the constraint.