I am not a VB jock, but have used a wizard to generate code to copy the current record. Now I have the requirement to blank out a field on the new record, and since it's a required field, the user will be prompted to consciously populate this field.
I'm looking for some simple code to pull this off that I can add to the "Copy a record" section of code. Here's the code the wizard generated. I realize it's ugly, but i was hoping someone could include how and where to insert the additional code as well as the lines of code themselves:
Private Sub Copy_BR_Button_Click()
On Error GoTo Err_Copy_BR_Button_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
Exit_Copy_BR_Button_Click:
Exit Sub
Err_Copy_BR_Button_Click:
MsgBox Err.Description
Resume Exit_Copy_BR_Button_Click
End Sub
Thanks for any help!!
I'm looking for some simple code to pull this off that I can add to the "Copy a record" section of code. Here's the code the wizard generated. I realize it's ugly, but i was hoping someone could include how and where to insert the additional code as well as the lines of code themselves:
Private Sub Copy_BR_Button_Click()
On Error GoTo Err_Copy_BR_Button_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
Exit_Copy_BR_Button_Click:
Exit Sub
Err_Copy_BR_Button_Click:
MsgBox Err.Description
Resume Exit_Copy_BR_Button_Click
End Sub
Thanks for any help!!