Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Posts
    34

    Talking Unanswered: Calling Code From Database

    We have created alot of projects at my work in Access. The problem is alot of them are really slow because the large amounts of data. Now that I am flowcharting them, I also see alot of code repeating from database to database. Is there a good way to write this code once and then call it from each database or would this be even slower?

    Thanks,
    Kelly

  2. #2
    Join Date
    Nov 2003
    Location
    LONDON
    Posts
    238

    Re: Calling Code From Database

    Originally posted by kellywray
    We have created alot of projects at my work in Access. The problem is alot of them are really slow because the large amounts of data. Now that I am flowcharting them, I also see alot of code repeating from database to database. Is there a good way to write this code once and then call it from each database or would this be even slower?

    Thanks,
    Kelly
    You can create an Access database as an add-in that can be used in any other database - for example all the wizards and builders that come with Access are just Addin databases. You would need to see the help file on what you need to do to make a database an addin as it involves registry entries etc.

    You could also open a reference to a database and use public functions from that database in your own database eg

    Private mocxAccess As Access.Application
    Set mocxAccess = New Access.Application

    Access.OpenDatabase = "MyDatabaseWithUsefulFunctionsInIt"

    You could also just put all your useful functions into one module and copy that to each database. This could be a managment nightmare if you have a lot databases, but is quick!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •