• Select References with VBA Code? (Using A2k (9.0.4402) SR-1)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Select References with VBA Code? (Using A2k (9.0.4402) SR-1)

    Author
    Topic
    #361201

    Can References be created by VBA Code?

    If so, what are the commands to select the following references automatically?:

    Visual Basic for Applications
    Microsoft Access 9.0 Object Library
    OLE Automation
    Microsoft DAO 3.6 Object Library
    Microsoft Visual Basic for Applications Extensibility 5.3
    Microsoft Office 9.0 Object Library
    Microsoft Windows Common Controls 5.0 (SP2)
    C:WindowsSystemCOMCTL32.OCX

    Thanks, John Graves

    Viewing 0 reply threads
    Author
    Replies
    • #545583

      What exactly are you trying to do? The first three references you listed are created automatically when you create a new database. The rest have to be set specifically, but you would also have to unselect the ADO reference. An additional problem is that the locations of those libraries vary depending on the operating system and the specific way that Office was installed (i.e., multiple versions on the same machine).

      In any case, open on-line help and type “reference object” (no quotes) in the answer wizard textbox to return a list of related help topics, including examples of code.

      • #545652

        Are the DOA and ADO references mutually exclusive? I thought it was possible to have both “checked” in same database?

        • #545709

          They’re not mutually exclusive, but in a converted database, the odds are that the references will not be object model specific, so the choices are either to uncheck the ADO references or to go through the code and add DAO to each reference as appropriate. shrug

          • #545726

            >>but in a converted database, the odds are that the
            references will not be object model specific<<

            Yes, in this situation you are absolutely right; it is better to uncheck the ADO reference. Saves alot of trouble! (been there, missed a declaration or two!)

      • #545685

        Hi Charlotte

        Thanks for your help.

        I found this which may be of interest to you and others.

        John Graves

        How can I save and restore the list of references ?

        http://www.unsoftwareag.com/PUP_UML_OK.asp…PE&Faq=TRUE

        Edited at activate link–Charlotte

    Viewing 0 reply threads
    Reply To: Select References with VBA Code? (Using A2k (9.0.4402) SR-1)

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

    Your information: