[AccessD] Can I have two Access databases at once?

Paul Wolstenholme Paul.W at industrialcontrol.co.nz
Tue Aug 23 16:39:57 CDT 2022


John,

I did it once.
The crux of the code is a function that includes the parameter
    ByRef stDatabaseFile As String
and includes the statements
    ' Target database
    Dim dbTrg As DAO.Database

    Set dbTrg = DBEngine.Workspaces(0).OpenDatabase(stDatabaseFile)
    ... useful stuff
    Set dbTrg = Nothing

Paul Wolstenholme


On Wed, 24 Aug 2022 at 02:11, Arthur Fuller <fuller.artful at gmail.com> wrote:

> I have a utility module which, as written so far, works with the
> CurrentProject. Unfortunately, that means I have to import it into each
> database I want to work with. What I'd rather do, if possible, is to pass
> in the name of the database to process, so that this utility could stand on
> its own.
>
> Is this possible?
>
> --
> Arthur
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list