Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Importing Collections
Message
General information
Forum:
Microsoft Office
Category:
Access
Miscellaneous
Thread ID:
00578504
Message ID:
00578540
Views:
15
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
Previous
Reply
Map
View

Click here to load this message in the networking platform