Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_DataListDataList Base Class

Public Property Get Item (
Optional ColNameOrIntIndex As Variant = -1,
Optional RowIndexOrPkVal As Variant = -1,
Optional SuppressError As Boolean = False
) As Variant

Return the data item by column and row. The column name or index may be used. The row index or the row unique value as set up with SetupPKCache may be used.
If omitted altogether (equivalent to passing an index of -1), the current iteration row or column value is used.

Optional ColNameOrIntIndex as Variant = -1

The column index (1 ... ColCount) (if an integer) or name (if a string). If omitted, the current iterated column.

Optional RowIndexOrPkVal as Variant = -1

The row index (1 ... RowCount) (if an integer) or row unique value as set up with SetupPKCache (if a string). If omitted, the current iterated row.

Optional SuppressError as Boolean = False

Do not display an error message if the row or column index are out of range, just return Null.

Call Template:

Dim obj As New xf_DataList
Dim v As Variant
v = obj.Item()
v = obj.Item(ColNameOrIntIndex, RowIndexOrPkVal, SuppressError)

See Also:

Example 1:

Debug.Print lst.Item(2, 4)               ' column 2, row4
Debug.Print lst.Item("CategoryName", 4)  ' the 'CategoryName' column, row 4
Debug.Print lst.Item("CategoryName")     ' the 'CategoryName' column, and the iterated row
Debug.Print lst.Item("CategoryName", "Chai") ' the 'CategoryName' column, and the row with Primary key 'Chai'
Debug.Print lst.Item()                   ' the iterated row and column
Debug.Print lst.Item(, 5)                ' the iterated column, row 5

lst.Item(2, 4) = "DataTest1"
etc.
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd