Verify/confirm user password

  • Thread starter Thread starter Michael Patel
  • Start date Start date
M

Michael Patel

I am building a Microsoft Access database with user-level security. I've
got a requirement that we confirm the currently logged-in user before
running a certain function that works with sensitive data. Essentially the
user would click on a button and be prompted to confirm their password
before continuing. Is there any way to do something like this?

TIA,
MP
 
Michael Patel said:
I am building a Microsoft Access database with user-level security. I've
got a requirement that we confirm the currently logged-in user before
running a certain function that works with sensitive data. Essentially the
user would click on a button and be prompted to confirm their password
before continuing. Is there any way to do something like this?


Sure. Ask for his password using an InpiutBox statement or whatever. Then
use the CreateWorkspace function to try creating a temporary workspace using
CurrentUser() as the user name, and whatever he typed as the password. If
that succeeds, the password that he typed was correct (and then just close
the workspace). But if it fails (which you should trap with an ON ERROR
statement), his password was not correct. Do a google groups search for
createworkspace & you will doubtless find more information.

Of course, if the current user does have a password, he must have entered it
to get into the system in the firsrt place! So I guess you are thinking of
the case where user 'A' logs in, then goes away (leaving the system logged
in), & user 'B' comes up & starts using the system?

HTH,
TC
 
Well found on dbengine! There are several dbengine methods that cause odd
errors unless you include the dbengine prefix.

TC
 
Back
Top