Your macro could use the RunCode
action to run a VBA function similar to this one:
Option Compare Database
Option Explicit
Public Function TransferTableToSqlServer()
DoCmd.TransferDatabase _
acExport, _
"ODBC Database", _
"ODBC;" & _
"Driver={SQL Server Native Client 10.0};" & _
"Server=(local)SQLEXPRESS;" & _
"Database=myDb;" & _
"Trusted_Connection=Yes;", _
acTable, _
"sourceTableName", _
"destinationTableName", _
False
End Function
For more information see
DoCmd.TransferDatabase Method
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…