access form button to copy record to another table

  • Follow


I would like to use one form button to copy a record to another table
and then delete it from the current table. Is this possible?
0
Reply JMageeirbc 11/15/2007 5:26:40 PM

This function will append fields F1, F2 from the current form into fields F1 
and F2 in Table1.. and then delete the current record.

sub append_and_delete
   Dim sql_string As String
   sql_string = "INSERT INTO Table1 ( F1, F2 ) SELECT '" & 
Me.Recordset.Fields("F1").Value & "','" & Me.Recordset.Fields("F2").Value & 
"'"
   Call DoCmd.RunSQL(sql_string)
   Me.Recordset.Delete
end sub

enjoy

"JMageeirbc@gmail.com" wrote:

> I would like to use one form button to copy a record to another table
> and then delete it from the current table. Is this possible?
> 
0
Reply Utf 11/15/2007 8:30:01 PM


1 Replies
2022 Views

(page loaded in 0.001 seconds)

Similiar Articles:
















7/18/2012 8:14:42 PM


Reply: