TrkTable.WantLookup (property)

property WantLookup
Syntax: Boolean = object.WantLookup
object.WantLookup = Boolean
Description:
Set this property to True before calling ReadDB to load all data, including data from the lookup table.
If you don't need the lookup table data, set this property value to False before calling ReadDB.

Note:

Once you set this property, you have to call ReadDB for this property to take effect on the result set.

Example 1:

Load table without lookup data.

Dim oTADBRoot As Object
Dim oTrkTable As Object
'Get Table from Collection of TrkTables
Set oTrkTable = oTADBRoot.TrkTables.Item("GroupAttribs^VEHICLE ORDER^Parts")
If Not oTrkTable Is Nothing Then
    'TrkTable Found ...
     oTrkTable.WantLookup = False
     oTrkTable.ReadDB
Else
    'Table Not found
End If

Example 2:

Load table with lookup data.

Dim oTADBRoot As Object
Dim oTrkTable As Object
'Get Table from Collection of TrkTables
Set oTrkTable = oTADBRoot.TrkTables.Item("GroupAttribs^VEHICLE ORDER^Parts")
If Not oTrkTable Is Nothing Then
    'TrkTable Found ...
   oTrkTable.WantLookup = True
oTrkTable.ReadDB 'This will load the lookup table
Else
    'Table Not found
End If