oh yea whoops. Sorry i forgot to remove that bit. The mousehook thing is to stop the mouse wheel scrolling through records, and disables it instead.
Fortunately what you want it to is more simple than what i've got but the same principle. You just need a table for the permissions of each user type but only 3 permissions. Although i would've thought you'd only need 2 as write and modify are much the same, but this is your choice.
When a user logs in, it looks up the values in the table to see what permissions they have and stores that permission in a global variable. When a form loads, it checks the variable to see if they're read or write. If they are read only, then it locks every field on the form but you can still scroll through to see things just can't write. If the variable has write access, then none of the fields are locked.
If you send me the database you're working on with exactly what you want it to do, i could probably set it up for you if you want, to save you faffing around with VB cos it can get a bit complex in places?
Hope this helps
Aidy
Fortunately what you want it to is more simple than what i've got but the same principle. You just need a table for the permissions of each user type but only 3 permissions. Although i would've thought you'd only need 2 as write and modify are much the same, but this is your choice.
When a user logs in, it looks up the values in the table to see what permissions they have and stores that permission in a global variable. When a form loads, it checks the variable to see if they're read or write. If they are read only, then it locks every field on the form but you can still scroll through to see things just can't write. If the variable has write access, then none of the fields are locked.
If you send me the database you're working on with exactly what you want it to do, i could probably set it up for you if you want, to save you faffing around with VB cos it can get a bit complex in places?
Hope this helps
Aidy