VBA Access and SQL Server, one SELECT and two database

S

sebasiten

Hello,

I would like to do this with VBA code in Access :

"select * into [MyNewAccessTable] from [MySQLServerTable]"

How can I do ?

Thanks
Sébastien.
 
S

sebasiten

Ok, autoreply ;)

I've found, it's as simple as that :

CurrentDb.Execute "select * into [MyNewAccessTable] from [SQL Server
Connection Strings].[MySQLServerTable]"

Sébastien.
 
A

Albert D.Kallal

If the mysql server table is already linked, then you can built a make table
query in the query builder...or, as you have

CurrentDb.Execute "select * into [MyNewAccessTable] from [SQL Server
tablename]

So, if the table is already linked...you don't even need any connection
strings or anything....
 
Top