How to update table in access vba

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • specialone
    New Member
    • Aug 2010
    • 1

    How to update table in access vba

    Hi,

    I am trying to update a new table which i have created. The purpose is if i change any input parameters and run the code, the table should automatically update itself. This is for 8760 hours in an year. I have created the table and the output results do get set in the specified table but I cant seem to update them....Please suggest what I need to do.

    ************Cod e***********

    'Tabular form result output

    rs3.AddNew
    rs3!Hour = rs1!Hour
    rs3!Cr = Cr(h)
    rs3!Cd = Cd(h)
    rs3!Cs = Cs(h)
    rs3.Update

    rs3.MoveFirst
    h = -1
    Do While Not rs3.EOF
    h = h + 1
    rs3.MoveNext
    Loop

    rs.MoveNext
    rs1.MoveNext
    rs2.MoveNext

    Loop
    Loop
    Loop

    Debug.Print Cs(0); Cs(8759)

    End Sub
    **************E nd of code*********** *
    How can I update this table if i make any new changes in recordset rs or rs1 or rs2?

    Thanks
    specialone
Working...