While in the main database window if you right click a table, form, query etc you can click Properties and then there is a Description field that can be populated.
I'm trying to use this Description field to group forms, queries, reports, macros and modules.
So far I'm able to list queries that have a common description (BASE) using code below but can't work out how to do the same for forms, reports, macros etc..
Any thoughts?
Function ListBASEQueries()
Dim qdfLoop As QueryDef
With CurrentDb
For Each qdfLoop In .QueryDefs
Debug.Print qdfLoop.Name
On Error GoTo Err_Property
If qdfLoop.Properties("Description") = "BASE" Then
Debug.Print " Description : " & qdfLoop.Properties("Description")
End If
Next qdfLoop
End With
Err_Property:
If DBEngine.Errors(0).Number = 3270 Then
Resume Next
End If
End Function
----------------
Shaun McLean
I'm trying to use this Description field to group forms, queries, reports, macros and modules.
So far I'm able to list queries that have a common description (BASE) using code below but can't work out how to do the same for forms, reports, macros etc..
Any thoughts?
Function ListBASEQueries()
Dim qdfLoop As QueryDef
With CurrentDb
For Each qdfLoop In .QueryDefs
Debug.Print qdfLoop.Name
On Error GoTo Err_Property
If qdfLoop.Properties("Description") = "BASE" Then
Debug.Print " Description : " & qdfLoop.Properties("Description")
End If
Next qdfLoop
End With
Err_Property:
If DBEngine.Errors(0).Number = 3270 Then
Resume Next
End If
End Function
----------------
Shaun McLean