duplicate record

bbwolff

Registered User.
Local time
Tomorrow, 00:14
Joined
Oct 1, 2013
Messages
116
i have a form that has data from table 1, where i select a person
and table 2, where i select an event
i need to duplicate data, as simply editing it would make a mess and really complicate things, so it's much easier if just make a new event.
I tried this code

DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdSaveRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend

but it adds data to both table, the main (person) and the related (event) table
How could I convince it to just add another record to the second table (it already holds the right id from the first)
and second, is the second line of the code necessary?
 
by only having one table as your recordsource

Put the person in a main form and the events in a subform
 

Users who are viewing this thread

Back
Top Bottom