Cloning part 2

G

Gary Schuldt

FrmA is active and displaying recX.

I want to:

1. Duplicate recX

2. Save recX

3. Display recX-dup (using frmA).

I used the Command Button Wizard to get the VBA code for Step 1 (see below).

However, I'm not sure how to do Steps 2 & 3. I know I could save recX by
closing frmA, but how do I know the "identity" of recX-dup so I can open
frmA to display it?

Thanks.

Gary
=====================================
Private Sub CloneRecord_Click()
On Error GoTo Err_CloneRecord_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append

Exit_CloneRecord_Click:
Exit Sub

Err_CloneRecord_Click:
MsgBox Err.Description
Resume Exit_CloneRecord_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