Share via

Using an accde as a reference

Anonymous
2012-11-13T11:58:06+00:00

I am trying to use an accde as a reference to hold common vba modules that I use in pretty much all our databases.  I am doing so for our latest development and then would like to rework our other 3 databases to use it as well.  This way I have one central point to maintain, update, improve upon.

I've Googled and found very little on this subject.  Is there a term for this? Or can anyone point me to any good links?

What I am curious about now is: Can I put certain common forms in the referenced accde and use them in the database?  For instance, the login form.  Every database uses the same login form, could it be migrated into the accde and called in the database so I only have 1 login form to maintain instead of 4?  What about queries or reports?

If you can't use a central reference accde to house common forms, queries, report,... (only vba) then what is a good method of keeping multiple databases up-to-date and in synch?

Thank you,

QuestionBoy

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

10 answers

Sort by: Most helpful
  1. Anonymous
    2012-11-13T16:42:49+00:00

    What I am curious about now is: Can I put certain common forms in the referenced accde and use them in the database? 

     

    I haven't ever done this, but it's my understanding that you can have common forms in the referenced ACCDE, but that ACCDE must also provide a public method to open them.  Then you can call that method to open the form.

    So, Dirk, would that be the same as calling an Add-in? My add-ins use a public function like this:

    Public Function Entry_DBBuilder()

    'Purpose  : Entry point required for Add-In manager.

    '           Opens frmMain.

    DoCmd.OpenForm "frmMain"

    End Function

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2012-11-13T16:17:12+00:00

    What I am curious about now is: Can I put certain common forms in the referenced accde and use them in the database? 

    I haven't ever done this, but it's my understanding that you can have common forms in the referenced ACCDE, but that ACCDE must also provide a public method to open them.  Then you can call that method to open the form.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-11-13T15:55:37+00:00

    I have no idea. I've never loaded a form form text at runtime. But it runs very quickly.

    Why would you need to do that? I realize that updating a front end and getting it out to all users might seem like a challenge, but actually, it's quite simple. If that is your reasoning then maybe my article Deploying and Updating Front End Database Applications and script sample at http://www.thatlldoit.com/Pages/howtosarticles.aspx will help you.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2012-11-13T15:38:16+00:00

    Loading in this fashion at runtime doesn't impact performance too negatively in your experience?

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2012-11-13T15:10:52+00:00

    Q-Boy

    This thread might be useful:

    http://www.dbforums.com/microsoft-access/1615228-reference-mde-code-library.html

    When it comes to common forms, I save them as text. Then I load them from those text files.

    Put this in the Immediate window and press Enter.

    Application.SaveAsText acform, "MyForm", "C:\CommonForms\MyForm.txt"

    To load, use Application.LoadFromText with the same arguments.

    There is an even easier way. I use an Add-in I got from http://iridule.net/cu/index.htm It's the last one on that page and is called Objects as Text. You might have to convert it to a later version, but all the code should still work.

    Was this answer helpful?

    0 comments No comments