Specify whether a database object is hidden or visible
- Under Objects in the Database window, click the type of database object whose properties you want to change.
- Click Properties on the toolbar.
- Select or clear the Hidden check box.
Note In a Microsoft Access project, you cannot change the properties of a table, query, or database diagram 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.
Show 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.
- On the Tools menu, click Options.
- Click the View tab.
- 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.
Show or hide system objects by default
Microsoft Access automatically creates system objects when you create a new database.
- On the Tools menu, click Options.
- Click the View tab.
- Under Show, select or clear the System objects check box.
You can use startup options to specify, for example, what form to display, whether toolbars can be customized, and whether shortcut menus are available in your Microsoft Access file. You can also use a special macro named AutoExec to carry out an action 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.
- On the Tools menu, click Startup.
- Select the options or enter the settings you want to use.
Create a macro that runs when an Access file first opens
- Create a macro containing the actions you want to run when you open the database.
- 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.
Data access pages are Hypertext Markup Language (HTML) files that reference the data in a database. The data access pages aren't actually stored in the Microsoft Access file. For this reason, Access has no control over the security of the data access page files. To protect a data access page that is stored on a local or network file system, assuming you have the appropriate permissions, you can use the following procedure.
Note To protect data access page files that are stored on an HTTP server, you must use the security features available on the server itself.
- Open Windows Explorer or My Computer.
- 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.
- 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.
Protect Visual Basic for Applications code
You can protect the Visual Basic for Applications (VBA) code in your Microsoft Access project (.adp) by using a password or by saving a copy of your file as an .ade 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.
Protect Visual Basic for Applications code with a password
To prevent someone from viewing or making changes to your Microsoft Visual Basic for Applications (VBA) code, you can protect the code by requiring a password.
- Open the Microsoft Access project (.adp) file or Microsoft Access database (.mdb) file that has the VBA code you want to help protect.
- In the Database window, point to Macro on the Tools menu, and then click Visual Basic Editor.
You can also press ALT+F11.
- In the Microsoft Visual Basic Editor, click <Access database or Access project name> Project Properties on the Tools menu.
- 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.
- In the Password box, type your password.
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.
- 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.
Cautions
Be sure to save a copy of your original Microsoft Access project (.adp) file.
- You can't modify the design of forms, reports, or modules in an Access project file saved as an .ade 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.
- Close the Access project file. If you are working in a multiuser environment, make sure that all other users have closed the Access project file.
- On the Tools menu, click Database Utilities, and then click Make ADE File.
- 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.
- In the Save ADE As dialog box, specify a name, drive, and folder for the Access project.
Change the password of your Access project
If your Microsoft Access project (.adp) 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.
- Open an Access project file or switch to the Database window for the open project.
- On the Tools menu, point to Security, and then click Set Login Password.
- In the Old Password box, type the current password.
- In the New Password box, type your password.
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.
- In the Verify box, confirm your password by typing the password again, and then click OK.
The password is now changed and Access resets 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.