Hi,
I have a table for which I need the user to be able to make an exact copy (every field except primary key) of a various "template" records which they then use as a basis for a new record in the table.
The existing database does this using the following:
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
after this code is run a macro then changes the primary key field value
This has a few problems already in that for some weird reason a couple of the fields don't get copied. I can get around that though.
My problem is now that I am adding some more features to the system and need this duplication to be completed without copying, pasting and duplicating in the form. ie I want the whole process to be completed in code before the button which runs this code loses the focus.
If anyone can help I would be most grateful!!!!
Thanks in advance
John
I have a table for which I need the user to be able to make an exact copy (every field except primary key) of a various "template" records which they then use as a basis for a new record in the table.
The existing database does this using the following:
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
after this code is run a macro then changes the primary key field value
This has a few problems already in that for some weird reason a couple of the fields don't get copied. I can get around that though.
My problem is now that I am adding some more features to the system and need this duplication to be completed without copying, pasting and duplicating in the form. ie I want the whole process to be completed in code before the button which runs this code loses the focus.
If anyone can help I would be most grateful!!!!
Thanks in advance
John