By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,122 Members | 927 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,122 IT Pros & Developers. It's quick & easy.

Duplicating data

P: n/a
Friends, I know I should not be doing this but I find it very usefull.
I need to duplicate records from one table to another table.
My table is named CLIENTS and has a field named FILENUMBER.
When I add a record in this field I would like that it automatically
is duplicated to another table which has a field named ACCOUNTNUMBER.
I will use the after update event.

Presently I am using a similar code to duplicate the field FILENUMBER
in the same table:

Dim MyDb As DAO.Database, MyRs As DAO.Recordset
Dim strCode As String
Dim strFilter As String
Set MyDb = CurrentDb
Set MyRs = MyDb.OpenRecordset("CLIENTS")
MyRs.AddNew
MyRs!SSN = Forms!CLIENTS!FILENUMBER
MyRs.Update
strCode = DMax("[ID]", "Clients")
strFilter = "(([ID] = " & strCode & ")) "
DoCmd.ApplyFilter , strFilter
End If

Any help?
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.