Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Mar 2002
    Location
    Buenos Aires, Argentina
    Posts
    877
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Load a Library from VBA (2003)

    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.
    <img src=/w3timages/blue3line.gif width=33% height=2>
    <img src=/S/flags/Argentina.gif border=0 alt=Argentina width=30 height=18> <big><font color=4682b4><font face="Comic Sans MS">Diegol</font face=comic></font color=4682b4> </big>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Load a Library from VBA (2003)

    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.

  3. #3
    5 Star Lounger
    Join Date
    Mar 2002
    Location
    Buenos Aires, Argentina
    Posts
    877
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Load a Library from VBA (2003)

    Hi Hans,

    <hr>if you tick the check box for a reference, it should be ticked whenever you open that database.<hr>
    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 <img src=/S/sigh.gif border=0 alt=sigh width=15 height=15>.
    <img src=/w3timages/blue3line.gif width=33% height=2>
    <img src=/S/flags/Argentina.gif border=0 alt=Argentina width=30 height=18> <big><font color=4682b4><font face="Comic Sans MS">Diegol</font face=comic></font color=4682b4> </big>

Posting Permissions

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