How can I copy a record from a table to another table?
I have 2 tables (TblAudio1 and TblAudio2)
TblAudio1 is the main table with all records.
TblAudio2 is an empty table that must be filled with a number of fields from TblAudio1
if I want to copy a number of fields from TblAudio1 to TblAudio2 with a button on form FrmAudio1 how would I have to do that?
The code currently looks like this:
Thank you in advance for your help!
I have 2 tables (TblAudio1 and TblAudio2)
TblAudio1 is the main table with all records.
TblAudio2 is an empty table that must be filled with a number of fields from TblAudio1
if I want to copy a number of fields from TblAudio1 to TblAudio2 with a button on form FrmAudio1 how would I have to do that?
The code currently looks like this:
Code:
Private Sub cmdKopie_Click()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
With Me.RecordsetClone
.FindFirst "ID = " & Forms!FrmAudio1!Id
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.GoToRecord , , acNewRec
DoCmd.RunCommand acCmdPasteAppend
Me.SRT = "A"
Me.NUMMER = ""
Me.TRACKNO = ""
End With
Me.Refresh
End Sub
Thank you in advance for your help!
Last edited: