Thank you, that worked. I tried the acCmdPaste before, but I see that I needed to select the record first. My DB is normalized; it is for a transport log with some of the records containing the same date, time, and miles.
"Dirk Goldgar" wrote:
[Quoted Text] > "Dave" <Dave[ at ]discussions.microsoft.com> wrote in message > news:D163E0AA-BD54-46A1-8C35-0C577D8B5310[ at ]microsoft.com... > > Is there a way to use the acPasteAppend to update a record instead of > > adding > > a new one? On my form I have a "Copy" button and a "Paste" button. This is > > the code: > > > > On the copy button (Command2) this code in the Click Event: > > > > Private Sub Command2_Click() > > DoCmd.RunCommand acCmdSelectRecord > > DoCmd.RunCommand acCmdCopy > > End Sub > > > > On the paste button (Command3) this code in the Click Event: > > > > Private Sub Command3_Click() > > DoCmd.RunCommand acCmdPasteAppend > > End Sub > > > > > acCmdPasteAppend won't work, because it is specifically to *append*. Try > this instead: > > Private Sub Command3_Click() > RunCommand acCmdSelectRecord > DoCmd.RunCommand acCmdPaste > End Sub > > But totally copying a record is an unusual thing to be doing. Are you sure > your database is normalized properly? > > -- > Dirk Goldgar, MS Access MVP > www.datagnostics.com > > (please reply to the newsgroup) > >
|