Table Row transfer

rishi_375

Registered User.
Local time
Today, 17:32
Joined
Dec 23, 2003
Messages
37
Hi,
I have two table in Test.MDB. First table name is Master and second table is MasterDetail. I want to copy all Master table row in to the MasterDetail table. It's like when user click on Transfer button it should start row transfer from one table to second table. How i do this task.
Thanks.
 
Use an append query to get all the rows into the detail table. You can specify some criteria in your append query if you don't really want all the rows to be transferred every time. Look up append queries in the Access online help.

As to how to use code behind a command button to append the records, you'll want some code like this:
(if you're using Access 97 with DAO)
CurrentDb.Execute "INSERT INTO MasterDetail SELECT Master.* FROM Master;"

If that command didn't work, you can try this version (for Access 2000+ with ADO):
CurrentProject.Connection.Execute "INSERT INTO MasterDetail SELECT Master.* FROM Master;"
 

Users who are viewing this thread

Back
Top Bottom