Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transfer Data Between Two Table

Status
Not open for further replies.

DDTiff

MIS
May 29, 2002
48
0
0
US
Hello,

Can someone help me with the problem I describe below? I appreciate your time and concern in advance.

I have a VB 6.0 form with two DataGrids. The Recordsources for these two DataGrids came from MS Access 2000 DB. The Recordsources name are as follow: Task & JT.

The JT table has the same field names & datatype as the Task with a two extra fields from another table. My goal is to build a cmdTransfer in VB 6.0, which enables the new/update recordsets in the Task table to transfer to the JT table by matching the field names between the two table.

For example, in the Task table I have two fields named (Name and Age), and in the JT table I have four fields (Name, Age, Addr, Phone). The Task table has 40 recordsets, and JT table has 20 recordsets. When I click cmdTransfer, I want the code to execute, and it will pull the 20 new recordsets in the Task table and paste them into the JT table, so now the JT table has 40 instead of 20 recordsets.

NOTE: Only the fields "Name" and "Age" in the JT table will have the new recordsets pull from the Task table. The Addr and Phone fields should have only 20 values/data.

I don't plan to have any textboxes on my form.

Once again, thank you for your time and help.


DTiff
 
Try something along these lines

DoCmd.RunSQL "INSERT INTO JT Name VALUES '" & me.Name & "';"
 
Try something along these lines

DoCmd.RunSQL "INSERT INTO JT Name VALUES '" & me.Name & "';"
 
Thank you makeShift for time and help. I'll try out your code, and let you know once I get it to work. Thanks! =)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top