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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help hiding Access Tables

Status
Not open for further replies.

hwkranger

MIS
Nov 6, 2002
717
US
I need help figuring out how to hide tables. I know how to click on them, but i link them programatically then drop them after I get the data I need.

For this though -- other people need to build reports from tables, and I don't want these tables left available for users to magically click on. (Yeah I know I can hide the delopement box, but there's always someone that figures something out, hiding them is just another step along the way of removing tempation)

Anyway -- this is my code:

Code:
Public Function LinkTable(strLocalName As String, strSourceName As String, strSourceLocation As String)
'Links a table to the current project
If fFindTable(strLocalName) Then
    DoCmd.DeleteObject acTable, strLocalName
End If
    DoCmd.TransferDatabase acLink, "Microsoft Access", strSourceLocation, acTable, strSourceName, strLocalName
    Dim tb As New ADOX.Table
    Dim cat As New ADOX.Catalog
    
    cat.ActiveConnection = CurrentProject.Connection
    Set tb = cat.Tables(strLocalName)
    tb.Properties("Jet OLEDB:Table Hidden In Access") = True
    
End Function

but magically it doesn't work. I"m not sure why. Any help is appreciated!

Randall Vollen
National City Bank Corp.
 
never mind -- it does work, I just had to refresh the screen.

Randall Vollen
National City Bank Corp.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top