I have a field on a form that needs to lookup to a view in another database (which happens to be rich text)and place the contents in this field and it needs to be editable.This is the code I’ve done:
Sub Exiting(Source As Field)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim NAQ As String
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim docA As NotesDocument
Dim rtitemA As Variant
Set uidoc = workspace.CurrentDocument
NAQ = uidoc.FieldGetText( "SvcName" )
Set db = New NotesDatabase( "mercury/Walker", "ClientServices\BestPractices.nsf" )
Set view = db.GetView( "NAQs Only" )
Set doc = view.GetDocumentByKey( NAQ )
Set docA = doc.Document
Set rtitemA = docA.GetFirstItem("Body")
Call uidoc.FieldSetText _
( "PNAQ", docA.rtitemA( 0 ) )
End Sub
It’s not working…I get “Type Mismatch” on the Set docA=doc.Document line. Not sure how I can get this to work the way I want.
Any help is appreciated.