Using DAO to Program Security

As you learned in Chapter 2, the DAO interface gives you programmatic access to Microsoft Jet. This same interface enables you to program much of the security implementation of your application. The only way to programmatically manipulate security in Microsoft Jet is by using DAO. Unlike other elements of the database, such as data definition language (DDL) operations on objects, you cannot use Microsoft Jet SQL to view or alter security settings.

Caution Although Microsoft Access may warn you if you are changing security in a way that might lock you out of your database, Microsoft Jet does not. To avoid causing irreparable damage to your database, use caution when making programmatic changes to security. Be especially careful when making changes to permissions for the Admins group or when removing user accounts from the Admins group. Make a backup copy of the database first.