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

Stuart McLachlan stuart at lexacorp.com.pg
Tue Aug 23 16:52:56 CDT 2022


Yes.
This gets the tables. Over to you to get the fields from them and populate comboboxes.

Function ListTables(myDB As String) As Long
Dim db1 As dao.Database
Dim tdf As TableDefs
Dim td As TableDef
Set db1 = DBEngine.OpenDatabase(myDB)
Set tdf = db1.TableDefs
For Each td In tdf
    Debug.Print td.Name
Next
End Function




On 23 Aug 2022 at 10:11, Arthur Fuller 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