PreviousActiveX Controls Guide (v10) Next

Columns

Chapter contents

Applies to:

VAccess

Description

The Columns property returns the number of columns defined in an extended fetch record set.

Remarks

If a SelectedFields property has been specified for extended fetch operations, this value will correspond to the number of fields specified in the SelectedFields property. Otherwise, it will correspond to the total number of fields defined for a record in the data file (see Fields property).

This property is not available at design time, read-only at run time. It will contain valid data only after the extended operations Init method has been invoked at run time. The ExtendedOps property must be set to True to enable the extended operations capabilities of the VAccess control.

Example

'In this example we will fill up a list box 
'with records from one extended op buffer 
Dim line As String 
Dim colcount, rowcount As Integer 
Orders.GetFirst 
Orders.ExtendedOps = True 
Orders.Init 
Orders.GetNextExtended 
For rowcount = 1 To Orders.Rows 
  Orders.Row = rowcount 
  line = "" 
  For colcount = 1 To Orders.Columns 
    'FieldValue returns a variant 
    'that we expect to be a string 
    'check to make sure it is 
    If Not VarType(Orders.FieldValue(colcount)) = _ 
vbError Then 
      line = line + CStr(Orders.FieldValue(colcount)) 
    End If 
  Next colcount 
  ListBox.Add line 
Next rowcount 

See Also

Affected by: ExtendedOps, SelectedFields


Chapter contents
Book contents

Prev topic: ColumnName
Next topic: ColumnWidth