Solved

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

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

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35143561

to unhide a table

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

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access 2016 - Labels prompt to print 4 31
Attachment field in SQL 3 28
Should I keep recordsets open? 3 24
Progress bar in access form 10 19
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

778 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