• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 644
  • Last Modified:

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

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
tomlewis
Asked:
tomlewis
  • 2
  • 2
1 Solution
 
Rey Obrero (Capricorn1)Commented:

to unhide a table

currentdb.tableDefs("tablex").attributes=0  
0
 
Rey Obrero (Capricorn1)Commented:
to unhide a table

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

to refresh the database object window

application.refreshDatabaseWindow
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
dbHiddenObject = 1
0
 
tomlewisAuthor Commented:
Thanks much!!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now