Open from frmA a form that is in frmB. Unreferenced :D

McPegasus

New member
Local time
Today, 23:07
Joined
Nov 5, 2023
Messages
6
Hello,

I have an appA.accdb and an appB.mda.

Need:
  • Open from appA a formHello that is in appB.
Request:
  • I CANNOT use the VBE schema/Tools/References.
  • DO NOT open a second instance of Access.
  • It must be embedded within appA. (The effect is as if it were referenced).
Unsuccessful tests:

Code:
Sub mcOpen_mod03()
'Este modelo abre una nueva instancia pero se cierra conforme finaliza el procedimiento.
'This model opens a new instance but closes as the procedure ends.

    Dim appAccessWork                               As New Access.Application


    Set appAccessWork = GetObject(cstrPathNamemda, "Access.Application")

    Call appAccessWork.DoCmd.OpenForm("frmHola", acNormal, , , , acWindowNormal)

End Sub

Sub mcOpen_mod04()
'Este modelo abre una nueva instancia de Access pero NO la hace visible, crea un .laccdb. Podría ser un modo candidato pero  no consigo mostrar el form.
'This model opens a new Access instance but does NOT make it visible, it creates a .laccdb. It could be a candidate mode but  I can't show the form.

    Dim appAccessWork                               As Access.Application


    Set appAccessWork = New Access.Application

    appAccessWork.OpenCurrentDatabase (cstrPathNamemda)

    Call appAccessWork.DoCmd.OpenForm("frmHola", acNormal, , , , acWindowNormal)

End Sub

Could you help me solve this question or give me ideas, thank you.

Rafael .:McPegasus:.
msAccess.es
Valencia | España
 
I CANNOT use the VBE schema/Tools/References.
What do you mean exactly?
Can you add a reference to appB in appA? If yes, that is the easiest (and potentially only) solution for your requirements.
 
Hello Sonic8,
Thank you very much for your quick response. I understand your response and have done so for the last two decades.
The need, I insist knowing what I am asking, is to access an unreferenced plugin.mda.
The main application (.accde) must work whether the mda exists or not.
 
Hello ebs17, Good contribution, I hadn't thought of it, but it's not worth it either :(.
Thank you very much for your interest.
 
WOW this is indeed the system, I was confused by others when I knew it but the tests I did did not use the appropriate syntax.
Thank you very much for your contribution, as soon as I read your response I was eager to understand that I had found the solution :D.
Great Josef P.
 
WOW this is indeed the system, I was confused by others when I knew it but the tests I did did not use the appropriate syntax.
Thank you very much for your contribution, as soon as I read your response I was eager to understand that I had found the solution :D.
Great Josef P.

I have been meditating and I have reviewed the multiple tests that I have been doing in previous months and here I have the closest I have been.
How would I know that it was not the full name of the file that acts as the library and it was the name of the project? :D

1700422282615.png

1700422457269.png

Thank you again.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom