- Local time
- Today, 15:40
- Joined
- Feb 19, 2002
- Messages
- 46,895
OK, game's over. This example is actually for a custom switchboard that supports add/change/delete/read access to the switchboard items but it includes the login form so you can see how it works to control access to the other forms. You could use the concept without the custom switchboard but you would need some other way to implement the security aspect.
A password that allows all access is posted on the login form. There are others in the table that have lower access so you can see how the forms work. When a new user is added or the password is reset, the default password is "password". When you log in with that password, the form requires you to change it before proceeding. You can add other code to require special characters or a minimum length or whatever.
When I distribute the app internally, I leave it as an .accdb because that is more convenient for me but I rename the .accdb to .accdr so when the user runs the app, he will NOT be allowed access to any object in design mode. This isn't true security since the user may know enough to know that he can simply rename the file back to .accdb so you probably want additional security but as I mentioned earlier, distributing for in-house vs for sale use requires only sufficient security to prevent accidents. People who muck around should be aware that attempting to crack the app is an offense that can result in dismissal for cause.
A password that allows all access is posted on the login form. There are others in the table that have lower access so you can see how the forms work. When a new user is added or the password is reset, the default password is "password". When you log in with that password, the form requires you to change it before proceeding. You can add other code to require special characters or a minimum length or whatever.
When I distribute the app internally, I leave it as an .accdb because that is more convenient for me but I rename the .accdb to .accdr so when the user runs the app, he will NOT be allowed access to any object in design mode. This isn't true security since the user may know enough to know that he can simply rename the file back to .accdb so you probably want additional security but as I mentioned earlier, distributing for in-house vs for sale use requires only sufficient security to prevent accidents. People who muck around should be aware that attempting to crack the app is an offense that can result in dismissal for cause.