Results 1 to 12 of 12

Reference Dialog Window

  1. #1
    woods is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Oct 2017
    Posts
    7

    Lightbulb Reference Dialog Window

    How do I print the common names of available references in Ms Access. I know how to print the Application.References but for an example, in the Reference Dialog the first Reference is displayed as: Visual Basic For Applications when I Print Applicaiton.Reference.Name is just says "VBA". I need the Common Name Reference. I am not a Novice, I have been programming for many years, but have ran into this issue.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    48,371
    Does not appear to be any property or method of the References collection to do this. I looked for a system table that would have this info and didn't find one. I considered the name must be loaded from the library file. Opened the VBA dll in notepad and did not find the common name as readable text. I read about a RefLibPaths registry and tried to find it. Must be for custom references and since I don't have any, I don't seem to have it. So another deadend. What you want might not be possible.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    14,343
    woods,

    Here is some code I have used. It came from Tony Toews

    Code:
    '---------------------------------------------------------------------------------------
    ' Procedure : DebugPrintReferencesIDE
    ' Author    : Jack
    ' Created   : 10/7/2009
    ' Purpose   :From Tony Toews, to get a list of references in current database/project.
    '------------------------------------------------------------------------------------------------
    ' Last Modified:
    '
    ' Inputs: N/A
    ' Dependency: N/A
    '------------------------------------------------------------------------------
    '
        Sub DebugPrintReferencesIDE()
    
              Dim refIDE As Object
    
    10            For Each refIDE In Access.Application.VBE.ActiveVBProject.References
    20                Debug.Print IIf(refIDE.IsBroken, "Broken ", "") & _
                           refIDE.name & " " & vbTab & refIDE.Major & "." & refIDE.Minor & vbTab & _
                           refIDE.Description & vbCrLf & vbTab & vbTab & vbTab & vbTab & refIDE.FullPath & vbCrLf
    30            Next refIDE
    
        End Sub
    I just ran it on my PC and database:

    Output is:

    Code:
    VBA     4.1 Visual Basic For Applications
                    C:\PROGRA~2\COMMON~1\MICROS~1\VBA\VBA7\VBE7.DLL
    
    Access  9.0 Microsoft Access 14.0 Object Library
                    C:\Program Files (x86)\Microsoft Office 2010\Office14\MSACC.OLB
    
    stdole  2.0 OLE Automation
                    C:\Windows\SysWOW64\stdole2.tlb
    
    SHDocVw     1.1 Microsoft Internet Controls
                    C:\Windows\SysWOW64\ieframe.dll
    
    Excel   1.7 Microsoft Excel 14.0 Object Library
                    C:\Program Files (x86)\Microsoft Office 2010\Office14\EXCEL.EXE
    
    Scripting   1.0 Microsoft Scripting Runtime
                    C:\Windows\SysWOW64\scrrun.dll
    
    MSXML2  6.0 Microsoft XML, v6.0
                    C:\Windows\SysWOW64\msxml6.dll
    
    ADODB   6.1 Microsoft ActiveX Data Objects 6.1 Library
                    C:\Program Files (x86)\Common Files\System\ado\msado15.dll
    
    Word    8.5 Microsoft Word 14.0 Object Library
                    C:\Program Files (x86)\Microsoft Office 2010\Office14\MSWORD.OLB
    
    VBScript_RegExp_55  5.5 Microsoft VBScript Regular Expressions 5.5
                    C:\Windows\SysWOW64\vbscript.dll\3
    
    Outlook     9.4 Microsoft Outlook 14.0 Object Library
                    C:\Program Files (x86)\Microsoft Office 2010\Office14\MSOUTL.OLB
    
    MSHTML  4.0 Microsoft HTML Object Library
                    C:\Windows\SysWOW64\mshtml.tlb
    
    Office  2.8 Microsoft Office 16.0 Object Library
                    C:\Program Files (x86)\Microsoft Office\Root\VFS\ProgramFilesCommonX86\Microsoft Shared\OFFICE16\MSO.DLL
    
    ADOX    2.8 Microsoft ADO Ext. 2.8 for DDL and Security
                    C:\Program Files (x86)\Common Files\System\ado\msadox28.tlb
    
    WIA     1.0 Microsoft Windows Image Acquisition Library v2.0
                    C:\WINDOWS\System32\wiaaut.dll
    
    WbemScripting   1.2 Microsoft WMI Scripting V1.2 Library
                    C:\Windows\SysWOW64\wbem\wbemdisp.TLB
    
    WSHControllerLibrary    1.0 
                    C:\Windows\SysWOW64\wshcon.dll
    
    WinHttp     5.1 Microsoft WinHTTP Services, version 5.1
                    C:\WINDOWS\system32\winhttpcom.dll
    
    Project1    0.0 
                    C:\Users\mellon\Documents\jGold01_A2K.mda
    
    Shell32     1.0 Microsoft Shell Controls And Automation
                    C:\Windows\SysWOW64\shell32.dll
    
    DAO     12.0    Microsoft Office 16.0 Access database engine Object Library
                    C:\Program Files (x86)\Microsoft Office\Root\VFS\ProgramFilesCommonX86\Microsoft Shared\OFFICE16\ACEDAO.DLL
    
    VBIDE   5.3 Microsoft Visual Basic for Applications Extensibility 5.3
                    C:\Program Files (x86)\Common Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB
    
    MSScriptControl     1.0 Microsoft Script Control 1.0
                    C:\Windows\SysWOW64\msscript.ocx

  4. #4
    woods is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Oct 2017
    Posts
    7

    Thanks!

    But this is also what I have ran into. The Code below from Orange is the similar to the code that I use. I know there has to be a way. The Reference Dialog that comes up is pulling that information from some where and if they can bring it into a Dialog Box then we should be able to use that information. I'll keep looking, Thanks again for your replies.

    Quote Originally Posted by June7 View Post
    Does not appear to be any property or method of the References collection to do this. I looked for a system table that would have this info and didn't find one. I considered the name must be loaded from the library file. Opened the VBA dll in notepad and did not find the common name as readable text. I read about a RefLibPaths registry and tried to find it. Must be for custom references and since I don't have any, I don't seem to have it. So another deadend. What you want might not be possible.

  5. #5
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    14,343
    woods,

    Your original post your example is VBA and Visual Basic For Applications.
    In my post VBA is the object.name and Visual Basic For Applications is the object.description.

    If that isn't what you need, then can you please give us an example. Sorry if I'm not understanding your requirement.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    48,371
    And of course as soon as I give up someone finds solution.

    Take a closer look at Orange's output. It does show the 'common' name as Description.

    However, can list only the references that are active in the project. If you want ALL references, again, not seeing how to do that programmatically.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    14,343
    While in Access, if you go to the VBE (ctrl-G), and click on Tools/References, you can see a list of all possible references. You can see the full path of each. The reference.description is presented in the list of references.

  8. #8
    woods is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Oct 2017
    Posts
    7
    Good morning orange, thank you for your reply in my question, but that does not answer my question. When you go to Tools/References the Dialog Box or Form that comes up where you can select what Resources you need, I need to Print that Windows Data. They have to be pulling that information some where. I can do the Application.References and get a "Name", but it is not the same as what is in the Dialog. Example: in the Dialog the very first one, in my case, is "Visual Basic For Applications" but when I use Application.Reference.Name it pulls "VBA". I need it to say what is in Bold. I need this to be able to go from Computer to Computer and select the right References.

  9. #9
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    14,343
    Have you tried

    Application.Reference.Description in place of Application.Reference.Name

    What exactly is your context --eg why Bolding.

    My guess is that many of the M$oft items are stored in specific folders/libraries. Other products such ErWin_Spy_AddIn , Faxcom....as in the jpg have some type library or DLL or some signature that M$oft/Access/VBA/VBIDE???? recognize and can "ferret out" the item to be added to the list.

    I realize this isn't a technical answer, but I don't know the details. I do know that my library of functions called Project1 is in the list.


    Click image for larger version. 

Name:	references.jpg 
Views:	7 
Size:	47.2 KB 
ID:	31013

  10. #10
    woods is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Oct 2017
    Posts
    7
    Sorry, orange, I did not look at the right of the print out, only the left side and that is what I had been getting. Let me try your code and see if that answers the question. Thank you for your time and patiences

  11. #11
    woods is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Oct 2017
    Posts
    7
    orange, Thanks! That is exactly what I was needing!

  12. #12
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    14,343

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 10-29-2017, 06:46 AM
  2. Replies: 3
    Last Post: 10-23-2013, 08:11 AM
  3. Dialog Box for Hyperlinks
    By Alan D.. in forum Access
    Replies: 3
    Last Post: 07-05-2013, 09:39 PM
  4. How to assign a dialog window mode for query
    By williamc3502 in forum Queries
    Replies: 5
    Last Post: 06-25-2012, 07:58 AM
  5. Pop-up Dialog Box
    By DianeG in forum Reports
    Replies: 4
    Last Post: 03-29-2010, 09:51 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums