Returns the first row whose item at the given column location contains the given prefix.

Syntax

rv = Send_Message(Ctrl, "OLE.FindString", Prefix, Column)

Parameters

ParameterDescription
PrefixThe prefix string to search for
ColumnThe column in which the search is to take place

Returns

The row containing the match if successful, 0 otherwise.

Remarks

The FindString method is useful for implementing a quick find or autofill feature. It performs a linear search, from top to bottom, looking for the first string containing the prefix in the given column. The search stops at the first success.

The Column parameter refers to a column in the original order. For example, passing a value of 5 will search column 5 even if the user moved that column to position 3.

Example

// Return the first row whose item in column 2 starts with SRP 
Row = Send_Message(@Window:".OLE_REPORTTABLE", "OLE.FindString", "SRP", 2)
  • No labels