Issues on Columnsvalue

If I set documents from views, I get doc.columnvalues(0)but when i set documents from collections then doc.columnvalues is not applicable.Then how can i get the columnvalues??Is there any solutions??

Set Doc=View.GetFirstDocument()

Set astr=Doc.ColumnValues(0) ’ getting value

Set Doc=DC.GetFirstDocument()

Set astr1=Doc.ColumnValues(0) ’ Not Applicable

Subject: Issues on Columnsvalue

In the case where the document is gotten from a collection, not a view, you should just get field values directly, using either extended notation, as in

name = doc.FirstName(0)

or

myval = doc.GetItemValue(“FirstName”)

If IsArray(myval) Then

name = myval(0)

Else

name = myval

End If