Link to home
Create AccountLog in
Microsoft Access

Microsoft Access

--

Questions

--

Followers

Top Experts

Avatar of ARampton
ARampton🇬🇧

Access Button to open another database Form
I have 2 Access Databases (each of which have links to tables in the other)

One is a general Project Enquiry & Reporting tool, the other maintains staff Project Time records

I would like to add another button to the first's switchboard to open a specific form in the second database and ignoring the second database AutoExec startup macro activity

I can launch forms in the current database but don't know what script would launch a form in another database (that may be closed or open)

Please ca I hav some examples

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )Scott McDaniel (EE MVE )🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Avatar of RgGray3RgGray3

Now as I think about it....  depending on what and how much you need from your 2nd app (how complex and how many Forms, queries and reports) do you need to access?

If it is simple, PlanB would be to import the 1 or 2 forms and queries into App1 and link to the tables.

Without knowing both applications...  it is hard to say which is the right approach.

Rich

Avatar of ARamptonARampton🇬🇧

ASKER

I have tried LMConsulting suggestion which I get to open my second database without running the Autoexec script but I can't get any subsequent opening of the form I want

How do I get this to trigger from my originating database?

Avatar of Scott McDaniel (EE MVE )Scott McDaniel (EE MVE )🇺🇸

Once you have an object "handle" on your database (i.e. the "objAccess" object), you can use any method to work with that object. As I suggested earlier:

objAccess.DoCmd.OpenForm "YourFormName"

should open that form, asssuming all went as planned when you grabbed the handle to that database.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of ARamptonARampton🇬🇧

ASKER

Thanks LSMConsulting

Got it working as expected - tried using the same idea with OpenReport and got errors I did not expect

I will try the idea of checking if the application is already open when I have some time

Avatar of ARamptonARampton🇬🇧

ASKER

1st and d2nd solutions are accepted
Microsoft Access

Microsoft Access

--

Questions

--

Followers

Top Experts

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.