Hide Sensitive Information

Name tables with the USys prefix to prevent them 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 names with USys. This acts as a flag to Access to treat the tables as a quasi-mix of system and user tables, and the ability is built in to hide or display them. Figure 2-13 demonstrates this procedure: a form is open and is clearly displaying data, but the Tables tab in the database window has no tables!

A form based on a hidden table

Figure 2-13. A form based on a hidden table

The form in Figure 2-13 has the record source property set to the USysClients table. In the Tools → Options → View menu, you'll find a setting for displaying system objects, as shown in Figure 2-14. Note that checking to display system objects makes USys tables visible.

Figure 2-15 shows all the system objects in their glory. The USys tables are there, as well as the MSys tables [Hack #15] .

Tip

The prefix isn't case-sensitive. You can use USYS, USys, usys, and so on; they all work to differentiate a ...

Get Access Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.