hiding tables....

  • Thread starter Thread starter ambushsinger
  • Start date Start date
How determined/informed/curious are your users?

.... and why?

You've asked a "how" question, but not explain what business need you hope
to solve ...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
Hi,

Try these routines to hide and unhide your tables:

Sub HideAllTables()
Dim lngTable As Long
Dim db As Database
Set db = CurrentDb
For lngTable = 0 To db.TableDefs.Count - 1
'Do nothing if temporary or system table
If Left(db.TableDefs(lngTable).Name, 1) = "~" Or _
Left(db.TableDefs(lngTable).Name, 4) = "MSYS" Then
Else
Application.CurrentDb.TableDefs(lngTable).Properties("Attributes").Value
= dbHiddenObject
End If
Next lngTable
End Sub


Sub ShowAllTables()
Dim lngTable As Long
Dim db As Database
Set db = CurrentDb
For lngTable = 0 To db.TableDefs.Count - 1
'Do nothing if temporary or system table
If Left(db.TableDefs(lngTable).Name, 1) = "~" Or _
Left(db.TableDefs(lngTable).Name, 4) = "MSYS" Then
Else
Application.CurrentDb.TableDefs(lngTable).Properties("Attributes").Value
= 0
End If
Next lngTable
End Sub

Regards

Kevin
 
This worked great...Thanks for taking the time.

kc-mass said:
Hi,

Try these routines to hide and unhide your tables:

Sub HideAllTables()
Dim lngTable As Long
Dim db As Database
Set db = CurrentDb
For lngTable = 0 To db.TableDefs.Count - 1
'Do nothing if temporary or system table
If Left(db.TableDefs(lngTable).Name, 1) = "~" Or _
Left(db.TableDefs(lngTable).Name, 4) = "MSYS" Then
Else
Application.CurrentDb.TableDefs(lngTable).Properties("Attributes").Value
= dbHiddenObject
End If
Next lngTable
End Sub


Sub ShowAllTables()
Dim lngTable As Long
Dim db As Database
Set db = CurrentDb
For lngTable = 0 To db.TableDefs.Count - 1
'Do nothing if temporary or system table
If Left(db.TableDefs(lngTable).Name, 1) = "~" Or _
Left(db.TableDefs(lngTable).Name, 4) = "MSYS" Then
Else
Application.CurrentDb.TableDefs(lngTable).Properties("Attributes").Value
= 0
End If
Next lngTable
End Sub

Regards

Kevin






.
 
Back
Top