On my form, I have a duplicate button with the following code:
Private Sub btnDuplicate_Click()
On Error GoTo Err_btnDuplicate_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, ,acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, ,cMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
Exit_btnDuplicate_Click:
Exit Sub
Err_btnDuplicate_Click:
MsgBox Err.Description
Resume Exit_btnDuplicate_Click
End Sub
This duplicate button works great.
The record I duplicate has the following fields:
Person Name, Person ID, Appointment Date, document1, document2, document3, received (this is a checkbox).
I want to add code that when the record is duplicated, the data is erased in fields document1, document2, and document3.
***I only want to erase the data from these 3 fields in the newly created duplicate record.
Thanks for your input!
Private Sub btnDuplicate_Click()
On Error GoTo Err_btnDuplicate_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, ,acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, ,cMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
Exit_btnDuplicate_Click:
Exit Sub
Err_btnDuplicate_Click:
MsgBox Err.Description
Resume Exit_btnDuplicate_Click
End Sub
This duplicate button works great.
The record I duplicate has the following fields:
Person Name, Person ID, Appointment Date, document1, document2, document3, received (this is a checkbox).
I want to add code that when the record is duplicated, the data is erased in fields document1, document2, and document3.
***I only want to erase the data from these 3 fields in the newly created duplicate record.
Thanks for your input!