#ACCESS VBA CODE EXAMPLES CODE#
Changing the code to reflect the appropriate form name is required for this. This splash screen may be replaced with a switchboard form or another form of the designer's choice. A userform/splash screen displays when a log in is successful. All passwords in the example file are: password.
#ACCESS VBA CODE EXAMPLES PASSWORD#
Three unsuccessful tries at the password result in the application shutting down. Additional coding could be implemented to disallow certain elements of the database to different levels of users. Nothing in this example is done with the access levels. This data table would ordinarily reside on the server. The data table consists of the username, the associated password, and the associated level of access. In this example, the data table is contained in an Access database as a remote connection is problematic. The process of creating forms, reports, data access pages, macros, and modules is virtually the same as that used to create an Access database. Working with an Access project (.adp file) is very similar to working with an Access database (.mdb file). In the case of an Access project (for example, an Access front end to a SQL Server database) this will be of more use than in the case of an Access database. This SHOULD NOT be mistaken for a security measure as it is easily bypassed by holding the shift key down or switching to design mode. This log in example illustrates the steps to require users of an Access database file to login. After 3 unsuccessful attempts, the application shuts down. This example begins with a log in form consisting of a combobox, a text box and a command button.