Solved

Opening References

Posted on 2014-11-08
5
107 Views
Last Modified: 2014-11-08
I have always had this problem of getting into a situation were
I need to see the references being used by my access 2003 program
I am usually in the debug mode because I am missing a needed reference
and yet the references link is grayed out. I have to go through numerous
steps to make the link to references available again.

My question: Is there an easy way to access the list of references being used
by my program and why is it sometimes grayed out?
0
Comment
Question by:Billxxxx
  • 2
  • 2
5 Comments
 
LVL 33

Accepted Solution

by:
Mike Eghtebas earned 500 total points
ID: 40430447
When it is executing code, it will be grayed out. Click on the reset (square button) to stop running it. Then Tools/References link is will be available.
0
 
LVL 75
ID: 40430471
This one will list your current References ... and if desired, remove a 'stuck' reference

Public Function mListReferences() As Boolean

    Dim ref As Reference
   
    For Each ref In Application.References
        Debug.Print ref.Name & "  " & ref.FullPath & " " & ref.Major & "." & ref.Minor
        'If ref.Name = "MSForms" Then
             'ref("MSForms").Remove
        'End If
    Next ref

End Function

Function ReferenceIsBroken(sRef As String) As Boolean
 
    Dim chkRef As Reference ' A reference.
   
    ' Check through the selected references in the References dialog box.
    For Each chkRef In Application.References
            Debug.Print chkRef.Name           ' ** Display the references
        If sRef = chkRef.Name And chkRef.IsBroken Then
            'if the ref matches the found ref and it is broken
            ReferenceIsBroken = True
            Exit Function
        End If
   
    Next
    ReferenceIsBroken = False
 
End Function

As eghtebas noted, about the only time a the Reference toolbar item will be grayed out is if you are currently executing (maybe you stopped at a Breakpoint) OR ... you are in an MDE or ACCDE.
0
 

Author Closing Comment

by:Billxxxx
ID: 40430538
"The Square Button"  It only makes sense. I should have known this 20 years ago.

Thanks for the answer.

Bill
0
 
LVL 75
ID: 40430587
"Is there an easy way to access the list of references being used
by my program"

Yes ... as I showed above.
0
 
LVL 33

Expert Comment

by:Mike Eghtebas
ID: 40430597
Billxxxx,

Please consider reopening this question to redistribute the points. In case you don't know how do this follow the instructions below.

This way the work done by DatabaseMX also gets appreciated.

Thanks,

Mike
----------

1. Go to: http://www.experts-exchange.com/Community_Support/General
2. From the menu at the top, select Solve/As a Question.
3. For sublect add: Reopen Question
4. For the body of message enter:
http://www.experts-exchange.com/Database/MS_Access/Q_28553526.html#a40430587

This is the url of your question.

5. Click on Submit

Thanks,

Mike
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access sql to sql server express 10 34
is Microsoft Access going to Die? 9 49
DCount Type Mismatch 2 22
SetFocus doesn't wait for input 14 32
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question