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:
but magically it doesn't work. I"m not sure why. Any help is appreciated!
Randall Vollen
National City Bank Corp.
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.