PrimaryIDOCollection property (WinStudio scripts)

Applies To

IWSForm interface

Definition

Returns a Visual Basic object that references a form's primary IDO collection.

Syntax

varObject = object.PrimaryIDOCollection

  Part   Description
varObject Required. A Visual Basic variable that is defined as an object and that references the primary IDO collection object being returned.
object Required. The name of a valid form object.

Example

Sub Main()
   Dim i As Integer
   Dim iNumEntries As Integer
   Dim anyModified As Boolean
   Dim oCache As IWSIDOCollection
   ' Set oCache to the form's primary IDO collection
   ' and retrieve the number of items in the collection.
   oCache = ThisForm.PrimaryIDOCollection
   iNumEntries = oCache.GetNumEntries()
   anyModified = False
   ' Loop through the form looking for modified rows
   ' and set a Boolean variable to true if any are found.
   For i = 0 To iNumEntries
      If oCache.IsObjectModified(i) Then
         Application.ShowMessage("Row " & CStr(i + 1) & " is modified.")
         anyModified = True
      End If
   Next i
   
   ' Based on the Boolean variable value, display a final message.
   If anyModified Then
      Application.ShowMessage("There are no other modified rows.")
   Else
      Application.ShowMessage("There are no modified rows.")
   End If
End Sub