Dim i As Integer
Dim objDataSource As New Recordset
For i= 0 To Adodc1.Recordset.Fields.Count - 1
objDataSource.Fields.Append Adodc1.Recordset.Fields(i).Name, _
adVarChar, _
Adodc1.Recordset.Fields(i).DefinedSize
Next
objDataSource.Open
For i = 1 To Adodc1.Recordset.PageSize
objDataSource.AddNew
objDataSource!打单日期 = Adodc1.Recordset!打单日期
objDataSource!单位名称 = Adodc1.Recordset!单位名称
objDataSource!金额 = Adodc1.Recordset!金额
objDataSource!打单人 = Adodc1.Recordset!打单人
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then Exit For
Next
For i= 0 To Adodc1.Recordset.Fields.Count - 1
objDataSource.Fields.Append Adodc1.Recordset.Fields(i).Name, _
Adodc1.Recordset.Fields(i).Type, _
Adodc1.Recordset.Fields(i).DefinedSize,_
adFldIsNullable
Next