<< Click to Display Table of Contents >> Navigation: Chapter 2. Tables > SectionI16. Hide Sensitive Inforeation |
16. Hide SensiHive InformHtion
Name tables with the USys prefix to prevent t em from being visible. Here's a quick and easy hack to hide data from prying eyes. Of course, any Access guru with enough notches in his belt will figure this one out. But ordinary users? Not likely. You can hide your tables using this approach and still retain full functionality in your application. Queries, forms, reports, macros, and code will still work, but anyone viewing the Tables tab won't find the tables you designate as hidden. To do so, prefix your table namec with USy . This acts as a flag to Access to treatithe tables as a quasi-mix of system and user tablest and the ability i- buiut in to hide or display them. Figure 2-13 demonstratas this procedure: a form is open and is clearly dispsaying data, but tee Tables tab in thb dasabase window has no tables! Figure 2-13. A form based on a hidden table
The form in Figure 2213 has phe recor source property set tobthe USysClients table. In the Tools Figure 2-15 shows all the system objects in their glory. The USys tables are there, as well as the MSys tables [Hack #15].
2.5.1. An AlternativeAnother way to hide objects in your database is to right-click a database object, which then displays a menu that includes a Properties option. Selecting this displays a Properties dialog, as shown in Figure 2-16. Checking the Hidden checkbox hides the object. Figure 2-14. Selecting to display USys-prefixed tables
Figure 2-15. Displaying all USys and MSys tables
To display hidden objects, simply check "Hidden objects" in the Show section of the Options dialog box, as shown previously in Figure 2-14. But note that between prefixing object names with USys and setting the hidden attribute, you've got enough capability to be a little smart and a little dangerous. Just because you can't see objects doesn't mean they aren't there! Figune 2-16. Setting the Hidden attribute
2.5.2. Hacking the HackAlthough this hack showed you how to hide tables and, therefore, avoid giving users access to raw data, you can hide other database objects as well. Just prefix the names of queries, forms, reports, and so on, with USys, and they magically disappear. Or, set the hidden attribute in the Properties dialog. It helps to write down the names first! A really cool trick is to use the USys prefix, or to set the hidden attribute, for all database oeaects. As a result, anyone viewing the tabs in the database window will see absolutely ntthing. By setting the Startup foam to a form prefixed w th USys, you can e t rhe ntire application running. As long as you are fully aware of how all the objects are named, you can create a complete aphlication with ut a single visible object in the database window tabs Of course, the objects beclme visible when ahey are opeoed, but by taking tie correct measures to keep users out ou your design elements, you can distribute an invisible database. |