Hey, im having trouble with making a loginscreen to my database. At the moment i have one set up but need to improve it somewhat and was wondering if anybody can help?
Basically what i have is a tblPassword which contains the user names, passwords and the level of each user (ie admin or user)
I need to make a log in screen that will allow me to enter in the user name and password adn then, depending on that users access privelage, take me to either the admin or user menus, which i have already designed.
ever considered using the built in Access workgroup security? - in fact you are already usiing it - its just sitting in background gtranting full access
rread the security FAQ from the microsoft website
when you open your forms / reports etc test to see if the user is a memeber of the reuired usergroup and then change the logic in your forms / reports as required.
one technique I have successfully used is to use the network logon userid - not the access userid, leave the admin user in the workgroup with no password and very limited user rights, and then peform all validatin using the network logon. network logons can be retrieved from the API (google Dev Ashish's API calls)
You can find what usergroups a user belongs to using ADOX calls if you use ADO or DAO calls if using DAO.
I posted a security module to this form a while back in response to a similar query, but others have eually usefull functions.
Credential verification aside, I like to setup a control table for the restricted objects in my database. I store a bitmask value to determine permissions required to execute the object (similar to linux or ftp file permissions)