Listing All Saved Queries in a Database : SQL Update « Access « VBA / Excel / Access / Word






Listing All Saved Queries in a Database

 
Sub List_SavedQueries()
   Dim cat As New ADOX.Catalog
   Dim v As ADOX.View
   Dim strPath As String

   strPath = CurrentProject.Path & "\mydb.mdb"
   cat.ActiveConnection = "Provider=Microsoft.Jet.OleDb.4.0;" & _
      "Data Source= " & strPath

   For Each v In cat.Views
      Debug.Print v.Name
   Next
   Set cat = Nothing
End Sub

 








Related examples in the same category

1.Executing an Update Query
2.Get the updated record count
3.Executing an Update Query using the Command Object
4.Deleting a Stored Query