VBA Access and SQL Server, one SELECT and two database

  • Thread starter Thread starter sebasiten
  • Start date Start date
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.
 
Ok, autoreply ;)

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

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

Sébastien.
 
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....
 
Back
Top