All you need for a save is this line:
DoCmd.RunCommand acCmdSaveRecord
Main Topics
Browse All Topicshave an acces database. have a form. this form is used to add reference docs. there are three fields on form : DocumentClass, DocumentName, Hyperlink (using a browse button also located on the form). There is also a subform of the table to which all of this is linked, giving the user viewability to the docs that are already in the system. Problem is, after he three text boxs are populated by the user, I hit a "save" button. this button says save, but it actually duplicate the record and clears the documentname and hyperlink fields leaving the class populated and ready for the user to enter more. However, after using hte "save" button a couple of times, I get an error or "Paste/Append" isn't available now. ideas?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
For a more sophisticated Copy Record situation, where there are many fields to copy and some not to copy, you can use the Tag property of controls on a form to determine which will be copied and which not copied. (The first sample is for a simple situation -- it might work for you.) Here is some code for copying records:
Hi LadyHagood
Thanks for posting your code.
As Helen has pointed out, any code that uses DoMenuItem is very old and should be avoided. A clue here is the "acMenuVer70", which refers to the menu structure of Access V7.0 (aka Access 95). Access 95 was about the worst version ever released, and we are now up to Access V14!!
The fact that the wizards still generate Access 95 code says a lot about why most of us who have been around for a while would never use a wizard :-)
I've attached below an alternative function you might like to consider for the general-purpose copying of records. It has certain advantages - for example, because it works on fields, not controls, it will copy fields that are in your recordsource but not bound to controls on your form. It also doesn't need to bother with distinguishing between bound and unbound controls.
It will automatically skip autonumber fields and fields that are not updatable (e.g. calculated fields in your query), and you can provide an optional list of other fields to skip, so you don't need to mess about with tags.
Just call it like this:
Call fm_CloneRecord( Me, "DocumentName", "OtherField" )
...where OtherField is the one bound to Text9.
(By the way, I strongly recommend you adopt the practice of giving controls meaningful names as soon as you add them to your form. Names such as Text9 and Command20 mean nothing and do not help you to write your code!)
In fact, if calling the function is the only thing you want the Click event to do, you could dispense with the event procedure and call it directly from the OnClick property:
=fm_CloneRecord( [Form], "DocumentName", "OtherField" )
Good luck!
--
Graham
Business Accounts
Answer for Membership
by: GrahamMandenoPosted on 2009-11-04 at 14:42:11ID: 25744868
Hi LadyHagood
Could you please post the code attached to your Save button's Click event?
I suspect there is a much better way to do this that copy/paste.
--
Graham