Illegal use of PROPERTY

Hi,

I am running an agent from the web and I am getting an error :

error: Illegal use of PROPERTY

Here is my code :

Sub Initialize

Dim s As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim TempDoc As NotesDocument

Dim strTempUNID As String



Set db = s.CurrentDatabase

Set doc = s.DocumentContext

strTempUNID = doc.TempDocID(0)

Set TempDoc = db.GetDocumentByUNID(strTempUNID)



doc.DocumentOwner(0) = TempDoc.DocumentOwner(0)

End Sub

I have a field on the form I am calling the agent from which holds the UNID of the document I am trying to access. Where am I going wrong?

Thanks

F1H

Subject: Illegal use of PROPERTY

The line should be…

doc.DocumentOwner = TempDoc.DocumentOwner(0)

Subject: RE: Illegal use of PROPERTY

Thanks Terry - Silly Mistake!

I also have a multi value field I need to transfer - how would i do that? (0) just transfers the first value.

Anyone have any suggestions?

Thanks

F1H

Subject: RE: Illegal use of PROPERTY

Do you not bother to read (and understand) replies to your previous questions?

Only one day ago you asked exactly the same question and were given a couple of perfectly good answers!

https://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/da9ce0b0c10652bd8525722e0059e97e?OpenDocument

Frunobulax

Subject: RE: Illegal use of PROPERTY

Many apologies.

  • Totally forgot I posted that.

Thanks for your help and clarification of how to use this forum.

F1H