Function SetRuikeiKingaku(F_NAME)
    
    On Error GoTo er
    Dim db As Database
    Dim Frm As Form
    Dim qur As QueryDef
    Dim wagldg As Recordset
    Dim iLoop, kLoop As Integer
    Dim sql As String
    Set db = DBEngine.Workspaces(0).Databases(0)
    Set Frm = Forms(F_NAME)
    Set qur = db.QueryDefs("CQR07_SUM")
    
    qur.parameters("START") = Frm("START")
    qur.parameters("FINAL") = Frm("FINAL")
    qur.parameters("WokCD") = Frm("检索")
    Set wagldg = qur.OpenRecordset()
    If wagldg.EOF Then GoTo SetRuikeiKingakuEnd
    
    For kLoop = 1 To Frm.COUNT - 1
        If Frm(kLoop).ControlName = "累计金额1" Then Exit For
    Next
    wagldg.MoveFirst
    iLoop = kLoop
    For lop = 0 To wagldg.Fields.COUNT - 1      '*********** New 1996/07/17 ***********
        If Not IsNull(wagldg(lop).Name) Then
            Frm(iLoop) = wagldg(wagldg(lop).Name)
        End If
        'Debug.Print "iLoop="; iLoop; "Name="; wagldg(wagldg(LOP).Name)
        iLoop = iLoop + 1
    Next
SetRuikeiKingakuEnd:
    wagldg.Close: db.Close
    Exit Function
er:
    Resume Next
End Function
这个函数要改成ADODB的怎么改啊?
哪能找到ADODB的教程啊?

 
											





 
	    
