Having problems copying a record and excluding field values...

J

Joe Leon

I have a form that

On Open I have the following Event Procedure to open as blank.

Private Sub Form_Open(Cancel As Integer)
DoCmd.OpenForm "tblPick_Eq"
DoCmd.GoToRecord , , acNewRec
End Sub

In the form I created a button to "Copy to New Record"
On Click I have the following Even Procedure

Private Sub CopyRecord_Click()
On Error GoTo Err_CopyRecord_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
Exit_CopyRecord_Click:
DoCmd.GoToRecord acForm, Me.Name, acNewRec 'goes to new record
Exit Sub

Err_CopyRecord_Click:
MsgBox Err.Description
Resume Exit_CopyRecord_Click

What I want to happen is that the new record is displayed. Instead what is
happening is that a blank record is displayed. I did noticed that the
duplicate record is getting done because if I go back one record from the
blank record the data is there.

How do I fix this?

Thanks! Joe....
 

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