RichText Items together with doc.GetFirstItem

We’ve just upgraded our client from Notes 5.8 to Notes 6.5. and I’m having problems with a form where I use RichText Items to display large fields.

It worked perfectly in Notes 5.8.

I’m getting a “Type mismatch” error on the Set richText = doc.GetFirstItem (see code below):

Dim richText As NotesRichTextItem

wkDate = “2004/01/01”

Set richText = doc.GetFirstItem (“TrnValDate” )

TrnValDate is defined as a Computed RichText Field on the document.

Any suggestions as to why I’m getting this error in Notes 6.5 and not in Notes 5.8 (where it’s working perfectly)?

Thanks

Anel

Subject: RE: RichText Items together with doc.GetFirstItem

You have a rich text field whose name ends in “Date”?

GetFirstItem has not changed.

I’m guessing either doc does not contain the value you think it does, or the item is not really rich text. The actual type of an item is not necessarily the same as the type defined for the corresponding field, particularly if the field is computed.

You probably will have to get the item into a variant and then test what type it is using Typename.