When opening a form from a view I get this error “Variant does not contain a container”
I have searched the forums, but have been unable to find a post which directly relates to the bug I am getting (despite alot of similar posts)
Below is the code, along with the line where the error appears.
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
'Get any need values from parent document
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim doc As NotesDocument
Set doc = source.Document
Dim parent As NotesDocument
If Not source.IsNewDoc Then
Set parent = db.GetDocumentByUNID (doc.ParentDocumentUNID)
If parent.PRlead(0) <> "" Then
doc.ProjLead = parent.PRLead(0)
End If
If parent.CTGDirector(0) <> "" Then
doc.TechnicalOwner = parent.CTGDirector(0)
End If
If doc.Assignee(0) <> "" Then
AssigneeChanged = doc.Assignee(0)
End If
ERRORS OUT HERE —>If doc.CommentsLog(0) <> “” Then
CommentsChanged = doc.CommentsLog(0)
End If
End If
End Sub
CommentsLog is blank in this example, and this is an old document. Very odd because the code for Assignee is exactly the same and works fine getting the var value without any erros.
So I am not sure where the problem arises. I did read something about an issue being related to Variant and arrays…this should be a string and not an array and that for some reason the code may be treating it as an array??
Variant seems to be required in the QueryOpen as seen at the top of the code. I am stumped, but will keep searching the forums and post here if I find anything.
Any help is appreciated!