Forum Discussion
JustAndy
Feb 03, 2025Copper Contributor
TRYING TO BUILD A LOGIN BUTTON/PASSWORD
Hi there, I hope you will be able to help me. I am very new to access and managed to build a small database for my work, mainly from watching you tube videos and reading google information however, I...
Gerrit_Viehmann
Feb 03, 2025Brass Contributor
File -> Options-> Object designers -> Always use event procedures (set checkbox)
This setting will not alter wizard behavior.
Remove existing event macros by deleting the "[Event Procedure]" text (or similar) in the event property. This will not delete VBA code (only the binding to it) or macro objects, but it will delete ad-hoc macros. Press F4 to show the properties window in form design mode and look in the events tab.
- JustAndyFeb 04, 2025Copper Contributor
Hi there, brilliant thank you for this I think I have cracked it now. As mentioned I am trying to build a simple code to be able to make my form a user log in form. I have tried watching some videos to create the code but keep getting errors. I have the following setup;
Table called: UserTable with fields UserID , Username , Password
Form called: LoginForm with username, password boxes and two buttons, logon and cancel
***************************
Is this going to be something too complex for me to do myself as a newbe to access?
Thanks again,
Andy
- Gerrit_ViehmannFeb 07, 2025Brass Contributor
Dear Andy,
It might indeed be a bit complex due to the nuances involved in implementing secure login mechanisms:
- Storing passwords securely and handling authentication requires a good understanding of security practices to prevent vulnerabilities. Access will provide very little help here. For example, Access doesn't natively support 2FA.
- Data stored in Access DBs can be somewhat secured, but if more than superficial tamper proofing is needed, put the data in a SQL Server (or PostgreSQL, etc.) database on a well-configured server. Also, make backups.
- If at all possible, don't require an additional login of your users. The user experience is not great. Learn about Role-Based Access Control (RBAC) and Active Directory security groups.
- Dealing with errors can be tricky, especially if you're not familiar with debugging techniques. Learn about the Access VBA IDE and how to create error handlers.
You can absolutely accomplish this with some patience and persistence.
Good luck!