gINT Rules throws error at CallByName

I am beginner learning the gINT Rules .

I am trying follow with the GR001 tutorial at page 97 (Code Samples) First Iteration in the book and apply it against a simple trial code project to see if I could get a sample text placed in the grid. 

I have a table as shown in the image.. 

I have the following rules code [copy and pasteed from gr001 example but with my field and table names] and what I thought were assignment statements in that gr001:

Option Explicit


'Commonly used field names
Public Const gs_Depth As String = "Depth"
Public Const gs_HoleDepth As String = "HoleDepth"
Public Const gs_PointID As String = "PointID"

Public glNumRows As Long
Public gsDataA() As String



Public Function InitFieldsFnB(ParamArray pvFieldsV() As Variant) As Boolean
'*****************************************************
'05Aug2003 sc
'Description:
'  Determine the positions of fields in the data array.
'  If any or not found, report the missing field or fields and abort further
'  code execution.
'Input:
'  pvFieldsV():  Elements 0, 2, 4,... are the field names.
'Output:
'  pvFieldsV():  Elements 1, 3, 5,... are the field positions.
'Returns:
'  True if fields were not found, False if all were found.
'*****************************************************
  Const s_FieldSeparator As String = ", "

  Dim iInd As Integer
  Dim iPsField As Integer

  Dim sMissingFields As String
  '------------------

  InitFieldsFnB = False
  sMissingFields = ""
  With gINTRules.GridData
    For iInd = 0 To UBound(pvFieldsV) Step 2
      iPsField=.FieldCol(CStr(pvFieldsV(iInd)))
      If iPsField Then
        pvFieldsV(iInd + 1) = iPsField
      Else
        sMissingFields = sMissingFields & _
                         s_FieldSeparator & _
                         pvFieldsV(iInd)
      End If
    Next iInd

    If Len(sMissingFields) Then
      sMissingFields = _
        Mid$(sMissingFields, Len(s_FieldSeparator) + 1)
      MsgBox "The following field(s) are missing " & _
             "from this table." & vbCrLf & _
             Space$(5) & sMissingFields & vbCrLf & _
             "Cannot perform the save checks " & _
             "and calcs without it/them." & vbCrLf & _
             "Data will be saved as-is.", _
             vbOkOnly, "Field Checking"
      InitFieldsFnB = True
    End If
  End With
End Function

'#LibInclude "Common"

Option Explicit

Public Sub Main
  With gINTRules.GridData
    'Put the grid data into a working string data array.
    gsDataA=.DataArray
    glNumRows = UBound(gsDataA, 2)
    CallByName Me, gINTRules.ProcedureName, vbMethod

    'Put the modified data array back into the input grid.
    .DataArray=gsDataA

    'Success is True if there were no errors.
    gINTRules.Success=CBool(.ErrorCol=0)
  End With
End Sub


Public Sub Laboratory



Dim iPsDepth As Integer
Dim iPsConfining_Pressure As Integer
Dim iPsDeviator_Stress As Integer
Dim iPsMoisture_Content As Integer
Dim iPsLiquid_Limit As Integer
Dim iPsPlasticity_Index As Integer
Dim iPsWet_Density As Integer
Dim iPsComments As Integer
Dim iPsPP As Integer
Dim iPsM200 As Integer
Dim iPsLab_Tech_Description As Integer

Dim lRow As Long



        With gINTRules.GridData

        iPsDepth = .FieldCol("Depth")
        iPsConfining_Pressure = .FieldCol("Confining Pressure")
        iPsDeviator_Stress = .FieldCol("Deviator Stress")
        iPsMoisture_Content = .FieldCol("Moisture Content")
        iPsLiquid_Limit = .FieldCol("Liquid Limit")
        iPsPlasticity_Index = .FieldCol("Plasticity Index")
        iPsWet_Density = .FieldCol("Wet Density")
        iPsComments = .FieldCol("Comments")
        iPsPP = .FieldCol("PP")
        iPsM200 = .FieldCol("-200")
        iPsLab_Tech_Description = .FieldCol("Lab Tech Description")


          For lRow = 1 To glNumRows
          
          'just trying to put the text into the Comments Field
          gsDataA(iPsComments, lRow) = "Test Data"
          Next lRow
        End With
       End Sub






The Tables are shown in the screen grab


Click image to get it to expand to show the fields I am working with ...

The error is in the line "CallByName Me, gINTRules.ProcedureName, vbMethod"   .. when I try to run the code it says "(10091) ActiveX Automation: no such property or method. No Pre- or Post-process code specified for table LABORATORY"

Am I missing some hidden fields or key fields Do I need Point ID? Confused as to why it breaks. Also Dont think I need the field names check function at this point, right?

Maybe I need a gINTRules.GridData.DataValue (Col, Row) = "My testing text here"???

Parents Reply Children