Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Unhide a Table 1

Status
Not open for further replies.

zevw

MIS
Jul 3, 2001
697
US
I Hid all Tables with this Function I cannot unHide it. Any Ideas how to unhide these Tables.

Function Test()

For Each AllTables In CurrentDb.TableDefs
'Get the Table name
tblname = AllTables.NAME
If Mid(tblname, 1, 4) <> &quot;Msys&quot; Then
'Hide All Tables
If AllTables.Attributes <> 1073741825 Then
AllTables.Attributes = dbHiddenObject
End If
End If
Next AllTables

End Function

Thanks in Advance!!
 
Hi!

Try setting them to dbNormalObject. I've not used this set of constants, but when working with file if you want to hide one you use vbHidden and to unhide it you use vbNormal. Again, I haven't tested this, so you might want to try the code on something unimportant to you.

If you can't figure out how to do it in code, you can go to Tool-Options and select to view hidden objects. Once you can see the tables you can right click on them and choose properties. At the bottom of the property sheet is a check box for the hidden property which you can uncheck.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Just a quick note- if you hide a table with code when you compact the DB the table will be dropped.
 
Pezamystik!!

I have compacted the DB many times and the Tables were never dropped.

Jebry!!

Thanks it works great, However you can only run it from an external module not from an event procedure with a form.
 
Pezamystik!!

I did in both Programs in 97 and 2000 and the tables were not dropped.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top