What is Autonumber ID of New Record?

G

Gary Schuldt

I'm using FrmA to display recX. RecX has an Autonumber field Xid for its
primary key.

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 (shown below) for Step
1, and it works fine.

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 reopen
frmA to display it?

Thanks.

Gary
=====================================
Private Sub CloneRecord_Click()

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

End Sub
===========================
 
Top