04 CrossProduct - AndrewMB2/Logic-Architect-for-Excel-VBA GitHub Wiki

CrossProduct method

Carries out a cross join to another Xdata object. Returns True if successful, otherwise False.

Applies to

TableData ArrData RsetData Xdata XShared

Parameters

Name Type Description
Xd Xdata The Xdata object to which this object will be joined.
CopyFields Value, Array or ParamArray List of fields to be brought in.

CrossProduct creates a cross join to another ArrData object or a TableData object (to produce all combinations of every record in the first dataset with every record in the second dataset). It then brings in the required fields specified in the CopyFields parameter which must be present in the ArrData object, or all fields with matching names if none are specified. All matched and required fields must have the same name in both objects.

AddFields can be a convenient way to create the fields required before running CrossProduct.

CrossProduct should be used with care on large data sets as it could produce a very large number of records.