• Load a Library from VBA (2003)

    Author
    Topic
    #453995

    Hi all,

    I have a form with some code that requires the Microsoft ActiveX Data Objects 2.7 Library. I need to import this form routinely to new MDB files, so I manually activate the library checkbox each time. Is there a way to do this automatically, say, on form open?

    Many thanks.

    Viewing 0 reply threads
    Author
    Replies
    • #1125858

      VBA references are stored with the database, so if you tick the check box for a reference, it should be ticked whenever you open that database.

      Setting references in code in Access can be done, but it is a very tricky process, so it’s best avoided.

      • #1125860

        Hi Hans,

        [indent]


        if you tick the check box for a reference, it should be ticked whenever you open that database.


        [/indent] Yes, but I need to import the form to new databases, and after so doing I find I have to make the reference afresh. If it is hard to accomplish via VBA code I guess I’ll keep doing it manually sigh.

    Viewing 0 reply threads
    Reply To: Load a Library from VBA (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: