Below is code I retrieved:
Private Sub Command75_Click()
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.OpenForm "Copy of MORNING", , , acNew
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close acForm, "Copy of MORNING"
End Sub
This code takes the current record of the main form ONLY and adds it to another form as a new record. I would like for this to work with the current record on the on the subform as well. Ending up with the current records from the main and subform as a complete new record in another form. How do I get this code to pull the current record from the subform at the same time??
Also - when the code is ran - I keep getting an error that states some of the field names don't match. I don't want to save EVERY field as an new record, just a select few...
Can get an example of how this could be done??
Thanks in advance!!!!
jw5107
Private Sub Command75_Click()
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.OpenForm "Copy of MORNING", , , acNew
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close acForm, "Copy of MORNING"
End Sub
This code takes the current record of the main form ONLY and adds it to another form as a new record. I would like for this to work with the current record on the on the subform as well. Ending up with the current records from the main and subform as a complete new record in another form. How do I get this code to pull the current record from the subform at the same time??
Also - when the code is ran - I keep getting an error that states some of the field names don't match. I don't want to save EVERY field as an new record, just a select few...
Can get an example of how this could be done??
Thanks in advance!!!!
jw5107