[AccessD] A2K: Hide Queires via VBA

Darren DICK d.dick at uws.edu.au
Sun Aug 8 18:48:03 CDT 2004


Hello all
I sent this one out a few weeks a go.
Don't think  got a reply so Here we go again:-))
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Hello all 
The following code hides all the tables in a dB- cool and it works well
But there seems to be no "dot attributes" (.Attributes) setting for Queries from the QueryDefs object
I basically wanna run some enumerating code like below and hide queries, forms etc
Similar to rightclicking in the object window (Tables,Forms,Queries etc)
then selecting an object say a table or form or a query then selecting PROPERTIES, then ticking the 
Attributes: Hidden checkbox

Any ideas?

Many thanks

Darren

Function f_HideAllTables ()
Dim db As DAO.Database
Dim tbl As TableDef

Set db = CurrentDb()
For Each tbl In db.TableDefs
    tbl.Attributes = 2
Next
Application.RefreshDatabaseWindow
end function



More information about the AccessD mailing list