Home  |  About  |   Search   

What's New
Table Of Contents
Credits
Netiquette
10 Commandments 
Bugs
Tables
Queries
Forms
Reports
Modules
APIs
Strings
Date/Time
General
Downloads
Resources
Search
Feedback
mvps.org

RunCommand Constants

Terms of Use


 

Bugs: To Hide or Not To Hide

Author(s)
Dev Ashish
  There are two methods to hide a table from view in the Database window.
  1. Right click on the table in the Database window and check the "Hidden" checkbox.
  2. From code, run code equivalent to this
    
    With CurrentDB.TableDefs("ToHideOrNotToHide")
      .Attributes = .Attributes or dbHiddenObject
    End With

Even though these two methods may seem equivalent on first glance, don't use dbHiddenObject from code!!

Michael Kaplan had warned previously that the use of this flag is ill advised.

To re-iterate the warning,  if you add dbHiddenObject to any table's Attributes, the table will be deleted during a compact operation.


1998-2009, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer