Forgot Password Access Request

Jakboi

Death by Access
Local time
Today, 11:05
Joined
Nov 20, 2006
Messages
303
Hello,

I was wondering is it possible to have a link that somehow will email a password to a user if that user forgets their password.

More a less something that looks like this as seen in many programs.

Forgot Password?

Searched but didnt find anything but didnt know.
 
This is how i would go about it. you would have to have the users email address stored and then do a dlookup based on the email that they provide you. after that you would need either create a report and email it as an attachment or some other email way. im not too up to date on emailing from access. youll have to search the forum for that
 
This is a basic email request which will create and email based on the Email Id field entered on the form frmFormName.

DoCmd.SendObject , "", "", [Forms]![frmFormName]![EMail Id], "", "", "", "", True, ""


I use the below to capture the users details and this then runs a query to update a usage table. This can then be cross referenced and their e-mail address used.


DoCmd.SetWarnings False
Dim oNet, oComp As Object
Set oNet = CreateObject("WScript.Network")
Set oComp = CreateObject("WScript.Network")
UserName = oNet.UserName
ComputerName = oComp.ComputerName
DoCmd.SetWarnings True

Then this used to send their details to you;

DoCmd.SetWarnings False
On Error GoTo cmdEmail_Err
DoCmd.SendObject , "", "", "You@yourdesk.com", "", "", [UserName] & " is a user of " & [Version], "Your computer number = ", True
MsgBox "E-mail has now been sent. Thank you", vbOKOnly, "Sent"
cmdEmail_Exit:
Exit Sub
cmdEmail_Err:
MsgBox "You cancelled and did not send the email", vbExclamation
Resume cmdEmail_Exit
DoCmd.SetWarnings True

Hopefully you can update this to you your own requirements. Good luck.

Dlookup also for your ref.

If (Not IsNull([NINO])) Then
If (Not IsNull(DLookup("[NINO]", "Advisor", "[NINO] ='" & Me!NINO & "'"))) Then
MsgBox "NINO has been verified.", vbOKOnly, "Verification"
Else
If MsgBox("Please check the NINO field - unable to verify against Advisor record", vbOKOnly, "Advisor table check") = vbOK Then
DoCmd.GoToControl "loans"
DoCmd.GoToControl "NINO"
End If
End If
End If

I know some people don't like placing their code on here, but hey, if it helps you out?! :D
 
I would point out that while simple to accomplish, there's a bit of a security risk here. If I'm sitting at my PC, try to log in as you, and click on this link, it will send the password to you. However, that email will appear in MY sent items, thus exposing the information to me. I would only do something like this if the email could be sent from the server, rather than the client. I accomplish that type of thing with SQL Server, so I'm not sure if/how it can be done with an Access BE.
 
I get your point. As long as you have a "change at first login" prompt you should be ok.

The information that I'm requesting anyway, is already available to all users via a big sticker on the side of their machine! The computer name is logged as their asset number, this is used thoughout our company to log IT helpdesk requests so everyone should know theirs anyway.
So no security issues for us. Thanks for your concerns though. :D
 

Users who are viewing this thread

Back
Top Bottom