hi, i think i've got a similar situation to yours happening....
i used the 'wizard' to create a 'Duplicate Record' cmdbtn which propagated
the following code:
Private Sub Duplicate_Click()
On Error GoTo Err_Duplicate_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
Exit_Duplicate_Click:
Exit Sub
Err_Duplicate_Click:
MsgBox Err.description
Resume Exit_Duplicate_Click
End Sub
one thing i've noticed is that ms a2k returns the following message claiming
"The value you entered isn't appropriate for the input mask '00/00/00'
specified for this field" which is apparently addressing one or more of the
pair of date fields i have in the table underlying the sub-form (displaying
date as medium date format).
(vba newbie that i am) what i'm interested in this form's being able to do
is as follows: i've put this button into the header field of the sub-form's.
whenever a subform listbox field i called "Continuing" is checked "Yes" this
cmdbtn is 'enabled' for the active record. clicking on the now enabled
"Duplicate" cmdbtn is supposed to duplicate the values for the active record
with the proviso that the "Continuing" listbox on the duplicate record is
supposed to have the value "No".
in the interest of getting as much details out of the way for the purposes
of this posting, there are 5 fields that comprise the composite PK of the
underlying table's:
patient_number (#), cycle (#), ae_description (txt), subtype (txt), onset
(date/time).