?
Solved

Can I report missing references in a msgbox?

Posted on 2004-04-25
7
Medium Priority
?
308 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 65

Accepted Solution

by:
rockiroads earned 2000 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

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.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
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…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

770 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