Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004
    Dallas, TX

    Unanswered: problem for display recordset in subform

    What I want to do is, according to given recordset rs value, I calculate some values and put it into new recordset rscp. Then I want to display rscp in the subform.
    This is my code, but the result of my code in the form for string type, it gives #error in subform, the double type, display blank. I test the rscp, it has correct values. I just don’t know why rscp has correct value and it cannot be displayed in my subform, could anyone help? thanks a lot

    Dim rscp As ADODB.Recordset
    Set rscp = New ADODB.Recordset
    Dim frm As Access.Form

    rscp.CursorLocation = adUseClient
    rscp.CursorType = adOpenForwardOnly
    rscp.LockType = adLockBatchOptimistic

    rscp.Fields.Append "Fund Family", adVarChar, 50
    rscp.Fields.Append "Invested", adDouble, , adFldIsNullable

    do until rs.eof
    rscp.AddNew _
    Array("Fund Family", "Invested”), _
    Array(rs.Fields(1), getInvested(rs.Fields(0)) )
    Set rscp.ActiveConnection = con
    Set frm = Form_DealSolver![frmCalculation].Form
    Set frm.Recordset = rscp

  2. #2
    Join Date
    Sep 2004
    Dallas, TX
    anybody know how to solve this? any help will be appreciated

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts