Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Can I report missing references in a msgbox?

Posted on 2004-04-25
7
Medium Priority
?
310 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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
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 specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

604 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