Solved

How to change the hidden attribute of an MS Access table programatically

Posted on 2011-03-15
5
487 Views
Last Modified: 2013-11-27
I import a table into my MS Access database from another MS Access database using  the "DoCmd.TransferDatabase" and the table arrives as hidden.  I need a way to programatically change the hidden status either on the way in, or after it arrives to allow subsequent work.
0
Comment
Question by:tomlewis
  • 2
  • 2
5 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 35143561

to unhide a table

currentdb.tableDefs("tablex").attributes=0  
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 35143624
to unhide a table

currentdb.tableDefs("tablex").attributes=0  

to refresh the database object window

application.refreshDatabaseWindow
0
 
LVL 75
ID: 35144716
Interesting ... that property appears to be independent of the Hidden Objects setting in Options ... see below.

In case you actually want to hide a table, you can use:

CurrentDb.TableDefs("Table1").Attributes = dbHiddenObject

mx


Capture1.gif
0
 
LVL 75
ID: 35144738
dbHiddenObject = 1
0
 

Author Closing Comment

by:tomlewis
ID: 35162760
Thanks much!!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now