Save Record to another table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kcludick
    New Member
    • Sep 2015
    • 3

    #1

    Save Record to another table

    HI,
    I have a master table with records and a secondary table. I need to call up a record from the master table via a form, but the edited record must only save to the secondary table. The master table's record must stay untouched. Is there a way to accomplish this?
  • hvsummer
    New Member
    • Aug 2015
    • 215

    #2
    you can use adodb.recordset to do this.
    first you set form source to the secondary table.
    call the value with adodb.recordset .open with strSQL "Select ... from ... " to get value from maste table
    then set value into destiny field of 2nd table with code: me.fieldname = formula of value in adodb.recordset .Fields.Item(Ro wNumber).Value code
    (any value you want to set as you wish here)
    then use DoCmd.RunComman d acCmdSave to save that record.

    work well when I select 1 field in strSQL, I'm not sure it'll work with 2 or more field or not lol

    Comment

    Working...