You can start looking at teh system tabel MSysObjects and use this in a query. You have to find the correct type, I think 1 is tables and 5 is queries. Youmay also need to filter out some to get those you want.
Sub AllDocuments() Dim cont As Container Dim doc As Document Dim i As Integer
On Error Resume Next
For Each cont In CurrentDb.Containers Debug.Print cont.Name For i = 0 To cont.Documents.Count Debug.Print vbTab & cont.Documents(i).Name Next i Next cont End Sub
Private Sub Kommandoknap0_Click() Const tblNavn As String = "tbldocs"
Dim cont As Container Dim doc As Document Dim i As Integer
DoCmd.RunSQL "DELETE * FROM tbldocs" With CurrentDb.OpenRecordset(tblNavn)
On Error Resume Next
For Each cont In CurrentDb.Containers For i = 0 To cont.Documents.Count - 1 .AddNew .Fields(0) = cont.Name .Fields(1) = cont.Documents(i).Name .Update Next i Next cont End With End Sub
du skal have en tabel ('tbldocs') med 2 felter. Herefter lægges koden ind under eks en knap.
Hi Niels, I can see that you have been following the discussions which have been going on recently. I was about to thorw the towel in until those co-admins woke up :o)
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.