View Full Version : hide queries and forms


oli82
02-12-2008, 03:25 AM
Is it possible to hide individual queries and forms from the navigation panel like you can with tables.

using the code:

Application.CurrentDb.TableDefs(sTableName).Proper ties("Attributes").Value = dbHiddenObject

Cheers,

Oliver

RuralGuy
02-12-2008, 10:12 AM
AFAIK they do not have a Hidden property. Why are you showing any of the Access interface? It is pretty easy to lock the user into just seeing your forms.

ed_the_unlucky
02-12-2008, 10:17 AM
oliver: i know you can by going through the properties, which implies that it should be possible, although i second ruralguy's question: why is the database window visible in the first place?

ed

CyberLynx
02-13-2008, 10:30 PM
Well.....Yes. But anyone truly familiar with Microsoft Access can easily find it.

You an either do it manually from within the Database Window itself or from code providing of course the item you are planning to hide isn't in use at the time.

Merely start the Table, Form, Query, Report, Macro, (etc.) name with Usys. For Example:

UsysMyForm
UsysMyReport
UsysMyMacro
UsysMyTable
UsysMyQuery

What this does by prefixing with Usys is making MS-Access think it's a System file which by default are non-visible (and rightly so). To view Access System files you would need to go into the Menu items Tools | Options | select the View tab then place a check mark on System Objects and bang on the Apply button.

Now....Don't play around in the actual MS-Access System files unless you really do know what you're doing. You can destroy your Database!.

Hmmmm....now everyone can find it

.

oli82
02-13-2008, 11:57 PM
The benefit of hiding tables, forms etc is that people already know how to find the navigation bar if it is hidden. Thanks for this technique its really useful and should keep people at bay for a while.

Cheers