Copy Record Date Won't Copy

K

Kenny G

Hello,

Using Access XP.

Below is the code I have to add a new record to the database and all works
except that the date (DOB) won't copy over. Is there something I am missing
in the code?

Thanks,


Private Sub cmdDuplicateRecord_Click()
On Error GoTo Err_cmdDuplicateRecord_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
'Unlock fields to insert copied data.
Me.MRN.Locked = False
Me.SID.Locked = False
Me.DOB.Locked = False
Me.LName.Locked = False
Me.FName.Locked = False
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
'Go to MRN and allow new MRN to be entered.
DoCmd.GoToControl "MRN"
Me.MRN = ""


Exit_cmdDuplicateRecord_Click:
Exit Sub

Err_cmdDuplicateRecord_Click:
MsgBox Err.Description
Resume Exit_cmdDuplicateRecord_Click

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top