LittleSmudge
Programmer
I have many databases set up using the standard Access Security Model.
There are two things that I need to do using a similar piece of code - that works in some dbs and clearly does not work in others.
Thing 1) Allow users to change their password
Thing 2) Allow a user to 'sign' a record in a certain table by requiring them to enter their password and verify it against the password in the Security.mdw file.
The code I use for Thing 1) is
DBEngine(0).Users(CurrentUser()).NewPassword Nz(txtOld, ""
, Nz(txtNew, ""
The code I use for Thing 2 is
DBEngine(0).Users(AuthorisedBy.Column(2)).NewPassword Nz(txtVerify, ""
, Nz(txtVerify, ""
The code should throw a 3033 Error if the original password is incorrect. however in some databases the code reliably ignores the check and sets the password to the new value regardless of the old - WORRYING.
Does anyone know WHY -
Or does anyone have a more reliable chunk of code to do the same thing ?
G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
There are two things that I need to do using a similar piece of code - that works in some dbs and clearly does not work in others.
Thing 1) Allow users to change their password
Thing 2) Allow a user to 'sign' a record in a certain table by requiring them to enter their password and verify it against the password in the Security.mdw file.
The code I use for Thing 1) is
DBEngine(0).Users(CurrentUser()).NewPassword Nz(txtOld, ""
The code I use for Thing 2 is
DBEngine(0).Users(AuthorisedBy.Column(2)).NewPassword Nz(txtVerify, ""
The code should throw a 3033 Error if the original password is incorrect. however in some databases the code reliably ignores the check and sets the password to the new value regardless of the old - WORRYING.
Does anyone know WHY -
Or does anyone have a more reliable chunk of code to do the same thing ?
G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.