FancyPrairie
Programmer
I have a library database (lib.accdb) that is referenced from my current database (MyDb.accdb). I have code in my database (MyDb.accdb) that opens a form (frmLib) that resides in my library database (lib.accdb). The form (frmLib) has a button that when pressed issues the command "DoCmd.RunCommand acCmdNewObjectDesignQuery". The problem with the command is that it launches the query designer showing all of the queries and tables in my Library database. I want it to list all of the queries and tables in my current database (MyDb.accdb).
I have tried variations of the following code, with no luck. Any ideas?
I have tried variations of the following code, with no luck. Any ideas?
Code:
Dim appAccess as Access Application
set appAccess = GetObject(CurrentProject.FullName)
appAccess.DoCmd.RunCommand acCmdNewObjectDesignQuery