Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Importing Collections
Message
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Divers
Thread ID:
00578504
Message ID:
00578540
Vues:
17
Sorry answered my own question:

For those interested:
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
__________________________________
Stephen W. Boyd
NJATC I.T. Support
steveb@njatc.org

"Our perceptions are our personal realities" ...unknown
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform