Public Sub MyTest(strFile As String) Dim dbs As Object Dim obj As AccessObject Dim strName As String Dim appAccess As Access.Application Set appAccess = New Access.Application With appAccess .OpenCurrentDatabase strFile End With Set dbs = appAccess.CurrentData For Each obj In dbs.AllQueries strName = obj.Name DoCmd.TransferDatabase _ TransferType:=acImport, _ DatabaseType:="Microsoft Access", _ DatabaseName:=strFile, _ ObjectType:=acQuery, _ Source:=strName, _ Destination:=strName, _ StructureOnly:=False Next obj appAccess.CloseCurrentDatabase strFile set appAccess = nothing set dbs = nothing End Sub