Is it possible to save unbound Continuous subform record Using Stored procedure and V

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sknaina
    New Member
    • Mar 2010
    • 11

    Is it possible to save unbound Continuous subform record Using Stored procedure and V

    Hi Eveybody,

    I've a main form with a continuous subform based on 'DonorTranSmast erF' & 'DonorTranSdeta ilsF' ,
    both tables are linked via 'DonorTransiD' field. I know & learn , How to save record Using SP & VBA
    if the context of 'Unbound Continuous Subform' is it possible to save record via SP & VBA ?
    Subform has two fields <'CboItemCode ' and 'Txtamount'>.
    (application build on A2003 ADP + Sql 2000 Srv.)
    Attached Files
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    If I understand correctly
    Yes, you will need to do it with VBA and you will need to add the DAO type library. To do that goto the code page of your form and go

    "ToolsMenu/references"

    You want to tick the "Microsoft DAO 3.6 Object Library"

    Here is some sample code to help you along
    Code:
       Dim db As Database, rst As DAO.Recordset, SQL As String
       Set db = CurrentDb
    
       SQL = "SELECT * FROM TheTable" 
       Set rst = db.OpenRecordset(SQL)
       While not rst.eof
          for I =1 to rst.fields.count-1
              msgbox rst.fields(i)
          next
          rst.MoveNext
       wend
    
       SQL = "exec TheStoredProc " & Param1 & "," & Param2 .... etc
       db.execute(strsql)
    
       Set rst = Nothing
       Set db = Nothing
    Judging from your other post I think you are capable enough to resolve your question from that.

    Don't hesitate to ask for help if you need it though.
    Just provide details.

    Comment

    Working...