Link to home
Create AccountLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Access VBA Code in Access database A to import table from column C into column B

Hi

What Access VBA Code in Access database A would I use to import a table from column C into column B?

All three databases are in the same folder.

Thanks
Avatar of ste5an
ste5an
Flag of Germany image

Please rephrase your question. It's not clear how many columns, tables and databases are involved and how the direction of data flow should be.

In general: You can specify an different database file in an query in Access by prepending the file name to the table name. e.g. running this in database d1.accdb:

UPDATE [d3.accdb].Table1 Dst 
    INNER JOIN [d2.accdb].Table1 Src ON Dst.ID = Src.ID 
    SET Dst.Payload = Src.Payload;

Open in new window

Avatar of Murray Brown

ASKER

Sorry I made a mistake. I meant database instead of column. So the question is: what Access VBA Code in Access database A would I use to import a table from database C into database B? In other words, how do I copy a table from one database  into another by using code in a different database to those two databases
ASKER CERTIFIED SOLUTION
Avatar of Natchiket
Natchiket
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account