ungthienhai > 12-09-22, 12:27 PM
Dim dbsSource As DAO.Database
Dim tdf As DAO.TableDef
Dim strSourceDb As String
With Application.FileDialog(1)
If .Show Then
strSourceDb = .SelectedItems(1)
Set dbsSource = OpenDatabase(strSourceDb)
For Each tdf In dbsSource.TableDefs
If Left(tdf.Name, 4) <> "MSys" Then
DoCmd.TransferDatabase acLink, "Microsoft Access", strSourceDb, acTable, _
tdf.Name, tdf.Name
End If
Next tdf
Else
MsgBox "No back end file selected", vbInformation, "Warning"
End If
End With