Solved

Can I report missing references in a msgbox?

Posted on 2004-04-25
7
307 Views
Last Modified: 2012-08-14
I would like to run a check when the mdb loads that will send a list of any missing references in a msgbox on the front end for debugging.  Can this be done?  If so, any suggestions, please?

Thanks!
0
Comment
Question by:earthman100
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 16

Expert Comment

by:ahmedbahgat
ID: 10914771
you may find good info here:

http://www.mvps.org/access/modules/mdl0022.htm

cheers
0
 

Author Comment

by:earthman100
ID: 10915159
I tried to install the add-in on that page, but when I run the add-in manager from my Access MDb I get a blank box, and when I close it it says "Subscript out of range".  Then the next time I try it says the wizard cannot be found...

I tried a repair of my Office 2000 installation with no luck.  I also tried to add it in in the references area, but no luck there either.

Any suggestions?
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 10915550
some smaple code here

http://www.experts-exchange.com/Databases/MS_Access/Q_20906809.html

use the .IsBroke property to find out missing refs
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 65

Accepted Solution

by:
rockiroads earned 500 total points
ID: 10915698
Ive cut it down, if you have not already done so

Public Sub CheckMissingReferences()
   
    Dim loRef As Access.Reference
    Dim intCount As Integer
    Dim intX As Integer
    Dim blnBroke As Boolean
    Dim strPath As String
    Dim bBroke As Boolean
   
    On Error Resume Next
   
   
    Err.Clear

    'Count the number of references in the database
    intCount = Access.References.Count
   
    'Loop through each reference in the database and determine if the reference is broken.
    'If it is broken, remove the Reference and add it back.
    For intX = intCount To 1 Step -1
       
        Set loRef = Access.References(intX)
        Debug.Print loRef.Name, loRef.FullPath
       
        'Dont do Access
        With loRef
           
            If .IsBroken = True Then
                MsgBox loRef.Name & " is broken" & vbCrLf & loRef.FullPath, vbInformation, "Check"
            End If
           
        End With
    Next
   
    Set loRef = Nothing
   
    Exit Sub
   
rrError:
    MsgBox "Error " & Err.Number & " trapped." & vbCrLf & Err.Description, vbCritical, "Check"
End Sub

0
 
LVL 16

Expert Comment

by:ahmedbahgat
ID: 10915952
sorry this addon is for access97 and not 2000, you should follow rockiroads comment


cheers
0
 

Author Comment

by:earthman100
ID: 10916151
Worked like a charm, rockiroads.   Thanks for the help!
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 10916406
no worries, the first link I gave you will also fix them
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

707 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