5 pts.
 How do I place duplicate directly below the copied record?
I have code (below) which works perfectly today attached to a button to copy a record in a form. But, it inserts the new record at the bottom of the form, I would like to make it past the new record immediately below the copied record. Is there a way to do this?

Private Sub Duplicate_Record_Click() On Error GoTo Err_Duplicate_Record_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append Exit_Duplicate_Record_Click: Exit Sub Err_Duplicate_Record_Click: MsgBox Err.Description Resume Exit_Duplicate_Record_Click

End Sub



Software/Hardware used:
MS Access
ASKED: January 20, 2010  3:20 PM
UPDATED: January 21, 2010  2:14 PM

Answer Wiki:
A form is just a method of displaying the records, so it doesn't go about ordering them in any way, unless you specify a sort order in your query. If the records have an id of some description that you can use to group them, then use that as the order by clause, and then rerun the query to update the form and display the records in order.
Last Wiki Answer Submitted:  January 21, 2010  2:14 pm  by  Darryn   765 pts.
All Answer Wiki Contributors:  Darryn   765 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _