Solved

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

Posted on 2011-03-15
5
493 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

911 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

19 Experts available now in Live!

Get 1:1 Help Now