Private Sub cmdReport_Click()
Dim rs As ADODB.Recordset
Dim fld As ADODB.Field
Set rs = New ADODB.Recordset
rs.Fields.Append "Name", adVarChar, 30
rs.Fields.Append "Amount", adCurrency
rs.Open
rs.AddNew Array("Name", "Amount"), Array("Rod", 123.45)
rs.AddNew Array("Name", "Amount"), Array("Michelle", _
12345)
rs.AddNew Array("Name", "Amount"), Array("Amy", 54.321)
rs.AddNew Array("Name", "Amount"), Array("Merlin", _
9.8765)
Set rptTest.DataSource = rs
rptTest.Show vbModal
rs.Close
End Sub
|