Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Microsoft Office Access
Search
Search
 
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Help protect a Microsoft Access project (ADP)
 

Unlike a Microsoft Access database (database: A collection of data related to a particular subject or purpose. Within a database, information about a particular entity, such as an employee or order, is categorized into tables, records, and fields.), you can't protect forms, reports, or macros in an Microsoft Access project (Microsoft Access project: An Access file that connects to a Microsoft SQL Server database and is used to create client/server applications. A project file doesn't contain any data or data-definition-based objects such as tables and views.) (.adp) by using user-level security (user-level security: When using user-level security in an Access database, a database administrator or an object's owner can grant individual users or groups of users specific permissions to tables, queries, forms, reports, and macros.). To help protect form and report objects, you can hide the objects in the Database window or set startup options. To help protect access to the design of forms, reports, and macros in an Access project file, you can set startup options. You can help protect a data access page (data access page: A Web page, published from Access, that has a connection to a database. In a data access page, you can view, add to, edit, and manipulate the data stored in the database. A page can also include data from other sources, such as Excel.) by using file or folder security for your operating system. You can also help protect your Visual Basic for Applications (VBA) (Visual Basic for Applications (VBA): A macro-language version of Microsoft Visual Basic that is used to program Microsoft Windows–based applications and is included with several Microsoft programs.) code by converting your Access project file to an .ade file or by setting a password. And finally, if your Access project is connected to a Microsoft SQL Server 6.5 (or later) database with SQL Server security implemented, then you can change the logon password from within Access.

ShowShow or hide database objects in the Database window

ShowSpecify whether a database object is hidden or visible

  1. Under Objects in the Database window (Database window: The window that appears when you open an Access database or an Access project. It displays shortcuts for creating new database objects and opening existing objects.), click the type of database object whose properties you want to change.
  2. Click Properties Button image on the toolbar.
  3. Select or clear the Hidden check box.

Note  In a Microsoft Access project (Microsoft Access project: An Access file that connects to a Microsoft SQL Server database and is used to create client/server applications. A project file doesn't contain any data or data-definition-based objects such as tables and views.), you cannot change the properties of a table, query, or database diagram (database diagram: A graphical representation of any portion of a database schema. It can be either a whole or partial picture of the structure of the database. It includes tables, the columns they contain, and the relationships between the tables.) because these objects reside in the Microsoft SQL Server database. However, you can change the properties of a form, report, macro, or module, because these objects reside in the Access project itself, not in the Microsoft SQL Server database. You can also change the properties of a data access page.

ShowShow or hide objects defined as hidden by default

If you need to work with objects that are defined as hidden without changing their status as hidden, you can display them in the Database window (Database window: The window that appears when you open an Access database or an Access project. It displays shortcuts for creating new database objects and opening existing objects.).

  1. On the Tools menu, click Options.
  2. Click the View tab.
  3. Under Show, select or clear the Hidden objects check box. Microsoft Access displays hidden objects with dimmed icons to distinguish them from objects that aren't defined as hidden.

ShowShow or hide system objects by default

Microsoft Access automatically creates system objects (system object: Database objects that are defined by the system, such as the table MSysIndexes, or by the user. You can create a system object by naming the object with USys as the first four characters in the object name.) when you create a new database.

  1. On the Tools menu, click Options.
  2. Click the View tab.
  3. Under Show, select or clear the System objects check box.

ShowUse startup options

You can use startup options to specify, for example, what form to display, whether toolbars can be customized, and whether shortcut menus (shortcut menu: A menu that shows a list of commands relevant to a particular item. To display a shortcut menu, right-click an item or press SHIFT+F10.) are available in your Microsoft Access file (Microsoft Access file: An Access database or Access project file. An Access database stores database objects and data in an .mdb file. A project file doesn't contain data and is used to connect to a Microsoft SQL Server database.). You can also use a special macro (macro: An action or set of actions that you can use to automate tasks.) named AutoExec to carry out an action (action: The basic building block of a macro; a self-contained instruction that can be combined with other actions to automate tasks. This is sometimes called a command in other macro languages.) or series of actions when your database first opens. When you open a database, Microsoft Access looks for a macro with this name and, if it finds one, runs it automatically.

  1. On the Tools menu, click Startup.
  2. Select the options or enter the settings you want to use.

ShowCreate a macro that runs when an Access file first opens

  1. Create a macro (macro: An action or set of actions that you can use to automate tasks.) containing the actions you want to run when you open the database.
  2. Save the macro with the name AutoExec.

The next time you open the database, Microsoft Access runs this macro automatically.

Note  If you don't want to run the AutoExec macro when you open the database, hold down the SHIFT key when the database opens.

ShowHelp protect data access pages

Data access pages are Hypertext Markup Language (HTML) (HTML: The standard markup language used for documents on the World Wide Web. HTML uses tags to indicate how Web browsers should display page elements such as text and graphics and how to respond to user actions.) files that reference the data in a database. The data access pages aren't actually stored in the Microsoft Access file (Microsoft Access file: An Access database or Access project file. An Access database stores database objects and data in an .mdb file. A project file doesn't contain data and is used to connect to a Microsoft SQL Server database.). For this reason, Access has no control over the security of the data access page files. To help protect a data access page that is stored on a local or network file system, assuming you have the appropriate permissions (permissions: A set of attributes that specifies what kind of access a user has to data or objects in a database.), you can use the following procedure.

Note  To help protect data access page files that are stored on an HTTP (HTTP: Internet protocol that delivers information on the World Wide Web. Makes it possible for a user with a client program to enter a URL (or click a hyperlink) and retrieve text, graphics, sound, and other digital information from a Web server.) server, you must use the security features available on the server itself.

  1. Open Windows Explorer Button image or My Computer.
  2. Locate the folder where the data access page's HTML file is located. By default, the file will be located in the same directory as your Access database.
  3. Right-click the data access page (.htm) file or the folder containing the file, click Properties on the shortcut menu, and then select the Read-only check box.

ShowHelp protect Visual Basic for Applications code

You can help protect the Visual Basic for Applications (VBA) (Visual Basic for Applications (VBA): A macro-language version of Microsoft Visual Basic that is used to program Microsoft Windows–based applications and is included with several Microsoft programs.) code in your Microsoft Access project (.adp) (Microsoft Access project: An Access file that connects to a Microsoft SQL Server database and is used to create client/server applications. A project file doesn't contain any data or data-definition-based objects such as tables and views.) by using a password or by saving a copy of your file as an .ade (ADE file: A Microsoft Access project (.adp) file with all modules compiled and all editable source code removed.) file. Saving your .adp file as an .ade file provides greater security than password protecting your code. However, there are some limitations in using an .ade file.

ShowHelp protect Visual Basic for Applications code by using a password

To prevent someone from viewing or making changes to your Microsoft Visual Basic for Applications (VBA) (Visual Basic for Applications (VBA): A macro-language version of Microsoft Visual Basic that is used to program Windows applications and is included with several Microsoft applications.) code, you can help protect the code by requiring a password.

  1. Open the Microsoft Access project (.adp) (Microsoft Access project: An Access file that connects to a Microsoft SQL Server database and is used to create client/server applications. A project file doesn't contain any data or data-definition-based objects such as tables and views.) file or Microsoft Access database (.mdb) (database: A collection of data related to a particular subject or purpose. Within a database, information about a particular entity, such as an employee or order, is categorized into tables, records, and fields.) file that has the VBA code you want to help protect.
  2. In the Database window, point to Macro on the Tools menu, and then click Visual Basic Editor.

    ShowTip

    You can also press ALT+F11.

  3. In the Microsoft Visual Basic Editor, click <Access database or Access project name> Project Properties on the Tools menu.
  4. On the Protection tab, select the Lock project for viewing check box. If you set a password but don't select Lock project for viewing, the code can be viewed and edited by anyone, but security measures still help project the Project Properties dialog box.
  5. In the Password box, type your password.

    ShowGuidelines for passwords

    Use strong passwords that combine upper- and lowercase letters, numbers, and symbols. Weak passwords don't mix these elements. Strong password: Y6dh!et5. Weak password: House27. Use a strong password that you can remember so that you don't have to write it down.

    User names can range from 1 to 20 characters, and can include alphabetic characters, accented characters, numbers, spaces, and symbols, with the following exceptions:

    • The characters " \ [ ] : | < > + = ; , . ? *
    • Leading spaces
    • Control characters (ASCII 10 through ASCII 31)

    Note  Passwords are case-sensitive (case-sensitive: Capable of distinguishing between uppercase and lowercase letters. A case-sensitive search finds only text that is an exact match of uppercase and lowercase letters.).

  6. In the Confirm password box, confirm your password by typing the password again, and then click OK.

    The password is now set. The next time you or any other user opens the database, a dialog box will be displayed that requests a password.

    Important  If you forget your password, it can't be recovered, and you won't be able to view or edit the VBA code.

ShowMake an ADE file

Cautions

Be sure to save a copy of your original Microsoft Access project (.adp) file.

  • If you need to change the design of these objects, you must do so in the original Access project file and then resave the Access project file as an .ade file.
  • You can't create an .ade file in Access 2002 or later from an Access project file created in an earlier version. You can only save an .ade file from an Access project file from the same version of Access.
  • You also won't be able to convert an Access project file saved as an .ade file in future versions of Microsoft Access. You will be able to run the .ade file in a later version of Access.
  1. Close the Access project file. If you are working in a multiuser (multiuser (shared) database: A database that permits more than one user to access and modify the same set of data at the same time.) environment, make sure that all other users have closed the Access project file.
  2. On the Tools menu, click Database Utilities, and then click Make ADE File.
  3. In the Database To Save As ADE dialog box, specify the Access project file you want to save as an .ade file, and then click Make ADE.
  4. In the Save ADE As dialog box, specify a name, drive, and folder for the Access project.

ShowChange the password of your Access project

If your Microsoft Access project (.adp) (Microsoft Access project: An Access file that connects to a Microsoft SQL Server database and is used to create client/server applications. A project file doesn't contain any data or data-definition-based objects such as tables and views.) is connected to a Microsoft SQL Server 6.5 (or later) database with SQL Server security implemented, then you can change the logon password from within Access.

  1. Open an Access project file or switch to the Database window (Database window: The window that appears when you open an Access database or an Access project. It displays shortcuts for creating new database objects and opening existing objects.) for the open project.
  2. On the Tools menu, point to Security, and then click Set Login Password.
  3. In the Old Password box, type the current password.
  4. In the New Password box, type your password.

    ShowGuidelines for passwords

    Use strong passwords that combine upper- and lowercase letters, numbers, and symbols. Weak passwords don't mix these elements. Strong password: Y6dh!et5. Weak password: House27. Use a strong password that you can remember so that you don't have to write it down.

    User names can range from 1 to 20 characters, and can include alphabetic characters, accented characters, numbers, spaces, and symbols, with the following exceptions:

    • The characters " \ [ ] : | < > + = ; , . ? *
    • Leading spaces
    • Control characters (ASCII 10 through ASCII 31)

    Note  Passwords are case-sensitive (case-sensitive: Capable of distinguishing between uppercase and lowercase letters. A case-sensitive search finds only text that is an exact match of uppercase and lowercase letters.).

  5. In the Verify box, confirm your password by typing the password again, and then click OK.

    The password is now changed, and Access has reset the .adp connection with the new password information. The next time you or any other user opens the project, a dialog box will be displayed that requests the new password.

Important  If you lose or forget your password, it can't be recovered, and you won't be able to open your project.

advertisement