Solved

Can I report missing references in a msgbox?

Posted on 2004-04-25
7
303 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now