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

CopyFrom method

Copies data to a TableData, ArrData or RsetData object from 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 from which the data will be copied.
Start Variant The first record to be copied.
Recs Variant The number of records to be copied.
Fields Value, Array or ParamArray List of field/column names.

CopyFrom copies data from Xd and appends the data to whatever may already be in the calling Xdata object. If Start and Recs are both 0, assumes start at the first record and finishes at the last record. Fields is the list of fields to be copied. If no list of fields is supplied then all fields are copied which are present on both Xdata objects. If Fields is * then all fields from Xd are copied and must be present on the calling Xdata object.

If the calling Xdata object or Xd is a TableData object, the process is buffered so copying is fast.