Login or Sign Up to become a member!
LessThanDot Site Logo

LessThanDot

Community Wiki

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Navigation

Google Ads

Difference between revisions of "Finding Broken Queries"

From Wiki

Jump to: navigation, search
 
Line 3: Line 3:
 
See: [http://msdn.microsoft.com/en-us/library/aa221244(v=office.11).aspx GetDependencyInfo Method [Access 2003 VBA Language Reference]]
 
See: [http://msdn.microsoft.com/en-us/library/aa221244(v=office.11).aspx GetDependencyInfo Method [Access 2003 VBA Language Reference]]
  
Do not forget that Track Name AutoCorrect info is not a good thing, for the most part, and should be turned off but it can be useful in certain circumstances.
+
Do not forget that Track Name AutoCorrect info is not a good thing for the most part, and should be turned off, but it can be useful in certain circumstances.
  
 
     Dim dinf As DependencyInfo
 
     Dim dinf As DependencyInfo

Latest revision as of 11:50, 9 March 2012

Here are a few notes that may be of interest, depending on your version of Access.

See: GetDependencyInfo Method [Access 2003 VBA Language Reference]

Do not forget that Track Name AutoCorrect info is not a good thing for the most part, and should be turned off, but it can be useful in certain circumstances.

   Dim dinf As DependencyInfo
   
   For j = 0 To CurrentData.AllQueries.Count - 1
   Set dinf = CurrentData.AllQueries(j).GetDependencyInfo
   
   For i = 0 To dinf.Dependencies.Count - 1
       Missing alias, query or table, as far as I can tell
       If dinf.Dependencies.Item(i).Name Like "MISSING:*" Then
           Debug.Print CurrentData.AllQueries(j).Name _
               & "   " & dinf.Dependencies.Item(i).Name
       End If
   Next
   Next

You may need to update dependencies:

   Application.CurrentProject.UpdateDependencyInfo

This will require a save.

819 Rating: 3.4/5 (42 votes cast)