Sub ImportSQLServerBAK()
'Declare variables
Dim strSQLServerConnStr As String
Dim strSQLServerBAKFilePath As String
Dim strAccessDBPath As String
'Enter the SQL Server connection string
strSQLServerConnStr = "Server=localhost;Database=master;Integrated Security=True"
'Enter the path to the SQL Server BAK file
strSQLServerBAKFilePath = "e:\AdventureWorksLT2012.bak"
'Enter the path to the Access database
strAccessDBPath = "e:\database4.accdb"
'Create a new ADO connection object
Dim cnn As New ADODB.Connection
cnn.Open strSQLServerConnStr
'Create a new ADO command object
Dim cmd As New ADODB.Command
cmd.ActiveConnection = cnn
'Create the SQL statement to restore the database
Dim strRestoreSQL As String
strRestoreSQL = "RESTORE DATABASE [DatabaseName] FROM DISK = '" & strSQLServerBAKFilePath & "'"
'Execute the SQL statement
cmd.CommandText = strRestoreSQL
cmd.Execute
'Close the ADO connection object
cnn.Close
End Sub