I have a custom add-in which is installed via the Add-In Manager and works
fine when called manually from the Add-Ins menu. The goal is to be able to
run the entry function of the add-in from code in the current database.
Normally, all that is needed to do it is to use
Application.Run "[addin project name].[entry function name]"
This indeed works in the A97 version of the same add-in. However, when I do
this in A2002 or A2003, Access crashes. The only time when Access does not
crash in this scenario is when before running the above statement, I
manually run the add-in from the menu. In this case, it will work as long
as Access remains open. So it looks as if Access needs to load and
"recognize" the add-in's VBA project before I can call a function in that
project from code. It does work if I explicitly add a reference to the add-
in, but I can't use that solution for unrelated reasons.
The entry function in the add-in is very simple:
Public Function dbp_Entry() As Boolean
DoCmd.OpenForm "frm"
End Function
where frm is a form in the add-in.
Any ideas, experiences, and workarounds would be appreciated.
--
remove a 9 to reply by email