Hi everyone out there.This thing had been bugging and bothering me too long. I really need help. I have used the codes that i find online. The codes are:Sub Click(Source As Button)
Dim nsCurrent As New NotesSession
Dim ndbSource As NotesDatabase
Dim ndbTarget As NotesDatabase
Dim nvwTarget As NotesView
Dim ndocSource As NotesDocument
Dim ndocTarget As NotesDocument
Set ndbSource = nsCurrent.CurrentDatabase
Set ndbTarget = nsCurrent.getDatabase(ndbSource.Server , "PRreq.nsf")
Set nvwTarget = ndbTarget.getView("FN")
Set ndocTarget = nvwTarget.getDocumentByKey("PR",True)
If Not ndocTarget Is Nothing Then
ndocTarget.Brand1=ndocSource.brand
Else
Msgbox "Could not access target document", 16, "Error"
End If
End Sub.
But when it reach the line that says; “Set nvwTarget = ndbTarget.getView(“FN”)” It gives the error that says Database – ----- PReq.nsf has not been opened yet. I have another different codes in which i tried, but it was too long and too confusing.
Can some one help me pls. Can anybody SUGGEST any other way on doing/ any sample codes. I would like to transfer a value in the field to another field in different database.When i press the action button, i want the computed fields in the target form to appear with the values.(Scripts are done in the “click” button)
Any Respond will be much appreciated. God Bless.