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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy fields from one table to another table using VBA.

Status
Not open for further replies.

littlebro

MIS
Jan 7, 2003
3
US
I have an Access database that has two tables in it. The first table has three fields in it and the other has four fields. I want to get two of the fields in the first table into the other table by pushing a button.

Can anyone help me?

Thanks
lb
 

[tt]
insert into table2 (field1, field2) select field1, field2 from table1
[/tt]

or something like that...

Good Luck

 

execute the sql from the vba...
[tt]
Dim adoCommandObject As ADODB.Command
Dim adoConnectionObject As ADODB.Connection
...
[/tt]

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top