Here is an example of how you can do this. Modify control names as needed.
Code:
Private Sub copyrecordbutton_Click() |
On Error GoTo Err_copyrecordbutton_Click |
Dim txtOld1 As Variant |
Dim txtOld2 As Variant |
Dim txtOld3 As Variant |
Dim txtOld4 As Variant |
|
txtOld1 = txtcurrent1.Value |
txtOld2 = txtcurrent2.Value |
txtOld3 = txtcurrent3.Value |
txtOld4 = txtcurrent4.Value |
|
RunCommand acCmdRecordsGoToNew |
|
txtnew1.Value = txtOld1 |
txtnew2.Value = txtOld2 |
txtnew3.Value = txtOld3 |
txtnew4.Value = txtOld4 |
|
|
Exit_copyrecordbutton_Click: |
Exit Sub |
|
Err_copyrecordbutton_Click: |
MsgBox Err.Description |
Resume Exit_copyrecordbutton_Click |
|
End Sub |