My Form
shows only a record per time. Data are read from 2 tables ([Data Processing List]
and [Attributes]
). In the Form
there is a Subform
that gets data from a third table ([Security Measures]
) and shows only the rows related to the record selected in the Form
.
In the Form
I have the button Copy
whose aim is to duplicate the selected record.
The problem is that it duplicates only data of the 2 tables of the form and not the one of the Subform
.
Did I do something wrong?
The code of the Copy
button is the following (simplified):
Private Sub Copy()
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdRecordsGoToNew
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdPaste
End Sub