How to copy an Access record into new record

leolion1966

New Member
Joined
Oct 13, 2015
Messages
10
Hello,

We have an Access database for managing multiple funding agreements and each agreement has its own record, with the exception of those that are split among multiple funding lines. So, for example, agreement 12345 from ABC corp may be split into 5 different records in our database due to the funding being split into 5 different cost structures. Because these different records have a lot of duplicitous data, it would be great if when creating new records for new agreements that also have multiple funding lines, I could just copy an initial record into a new record and edit the salient points that need to be changed.

While I've been able to copy/paste from the various fields within a record, I've not had any luck finding a means of copying an entire record. As an aside, we are using Access now as an "upgrade" and replacement of our databases that used to be maintained on an old Paradox platform (DOS based database utility). As clunky and old-school as that system was, it had a simple means for copying an existing record and pasting into a new one. Just Alt + E + C (Copy) and Alt + E + P (Paste). Unfortunately, haven't found something similar in Access, but have a hard time believing it's not a capability the program can support.

Thanks in advance,
Matt
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Perhaps something like this:

Code:
[TABLE="width: 281"]
<colgroup><col></colgroup><tbody>[TR]
[TD]Private Sub copyrecordbutton_Click()[/TD]
[/TR]
[TR]
[TD]On Error GoTo Err_copyrecordbutton_Click[/TD]
[/TR]
[TR]
[TD]Dim txtOld1 As Variant[/TD]
[/TR]
[TR]
[TD]Dim txtOld2 As Variant[/TD]
[/TR]
[TR]
[TD]Dim txtOld3 As Variant[/TD]
[/TR]
[TR]
[TD]Dim txtOld4 As Variant[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD]txtOld1 = txtcurrent1.Value[/TD]
[/TR]
[TR]
[TD]txtOld2 = txtcurrent2.Value[/TD]
[/TR]
[TR]
[TD]txtOld3 = txtcurrent3.Value[/TD]
[/TR]
[TR]
[TD]txtOld4 = txtcurrent4.Value[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD]RunCommand acCmdRecordsGoToNew[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD]txtnew1.Value = txtOld1[/TD]
[/TR]
[TR]
[TD]txtnew2.Value = txtOld2[/TD]
[/TR]
[TR]
[TD]txtnew3.Value = txtOld3[/TD]
[/TR]
[TR]
[TD]txtnew4.Value = txtOld4[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD]   [/TD]
[/TR]
[TR]
[TD]Exit_copyrecordbutton_Click:[/TD]
[/TR]
[TR]
[TD]    Exit Sub[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
If all you want to do is copy a record like before, select a record (or records) from the source table, go to the target table and on the ribbon, choose Paste/Append.
As long as you're not copying an autonumber id or any value that already exists in a target table with a PK or index/no dupes, it works.
 
Upvote 0

Forum statistics

Threads
1,221,832
Messages
6,162,255
Members
451,757
Latest member
iours

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top