Had a very similar problem not long ago....
this is some old code i used...
this code is deleting a record from the table orders and copying it to the table 'invoiced'
Private Sub DUPLICATION_Click()
On Error GoTo Err_DUPLICATION_Click
Dim rsOrders As Recordset
Dim rsInvoiced As Recordset
Dim sOrderID As String
Set rsOrders = Application.CurrentDb.OpenRecordset("orders", dbOpenDynaset, dbPessimistic)
Set rsInvoiced = Application.CurrentDb.OpenRecordset("Invoiced")
'the table you want to copy the data from
rsOrders.MoveLast
rsOrders.MoveFirst
'
sOrderID = Me.OrderID
'
rsOrders.FindFirst ("orderID = " & sOrderID)
'
rsInvoiced.AddNew
'
rsInvoiced("orderID") = rsOrders("orderID")
'
rsInvoiced("CustomerID") = rsOrders("CustomerID")
'
rsInvoiced("EmployeeID") = rsOrders("EmployeeID")
'
rsInvoiced("OrderDate") = rsOrders("OrderDate")
'
rsInvoiced("ShipVia") = rsOrders("ShipVia")
'
rsInvoiced.Update
rsOrders.delete
'
rsOrders.CLOSE
rsInvoiced.CLOSE
I'm aware that using a recordset isn't always the quickest or logical way (it does work though!)
Someone gave me this code on these forums yesterday to copy fields...this could also be modified
Private Sub Purchase_Orders_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "PurchaseOrder"
'
DoCmd.OpenForm stDocName, , , stLinkCriteria
'
[Forms]![PurchaseOrder]![EndUser] = [Forms]![Orders]![EndUser]
[Forms]![PurchaseOrder]![Employee] = [Forms]![Orders]![EmployeeID]
[Forms]![PurchaseOrder]![OrderID] = [Forms]![Orders]![OrderID]
End Sub
if you need to copy details from a subform as wll let me know and ive got the complete code. Hope this helps, am new to VB myself..
Let me know if you need anymore help
Sarah