I need to create a form in which people can select their username and hit ok and their previous password can be looked up and email could be send to them with their previous password. Please help urgently.
I need to create a form in which people can select their username and hit ok and their previous password can be looked up and email could be send to them with their previous password. Please help urgently.
Usernames are 'selected' from a combobox? So anyone could select any username and get any password? If you want some security (Access is very weak in this regard) then don't use combobox to 'select' username. Like a Windows login, user types username and password into textboxes.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
but how to create it
Create a user table. tblUserSecurity_Sec to store original user names and passwords.
Create a Lost Password table. tblLostPassword
tblUserSecurity_sec:
recid AutoNumber Counter.
lastsignon Date/Time Date User Last Signed On.
pw Text Users Session Password. Input mask Password
userID Text User Name Primary Key.
dev yes/No Is user a Developer?
admn yes/no Is user an Asdministrator?
sprvsr yes/no Is user a Supervisor?
data yes/no Is user a Data Entry Person?
reado yes/no Is user a Read Only Person?
tblLostPassword:
LostPswdID AutoNumber Primary Key.
lastsignon Date/Time Date User Last Changed Password.
pw text Users Session Password.
userID Text Users Login Name.
This would be just the beginning of your password design.
Next,create your form and add code.
HTH
EDIT: If I'm not mistaken, there is a demo on how to create one on here and maybe a sample. I have not checked. Have you Googled or looked on YouTube?
Last edited by burrina; 05-10-2014 at 12:36 PM. Reason: Sample Database
Yes I tried but didn't got one. Thanks for your inputs. I have made one code but i am stuck how to print the value of my password.
If you can help.
Here is my code
Dim st As String
Dim rs As dao.Recordset
Dim strHTMLBody As String
Dim strPassword As String
st = "select * from tblUser where txtEmailAddress = '" & cmbEmail & "'"
Set rs = CurrentDb.OpenRecordset(st, dbOpenSnapshot)
MsgBox "You will receive your Previous Password in your mailBox"
'MsgBox rs!Password
'MsgBox rs!FName
Dim oApp As Outlook.Application
Dim oMail As MailItem
Set oApp = CreateObject("Outlook.application")
Set oMail = oApp.CreateItem(olMailItem)
oMail.Body = "Your Password"
strHTMLBody = strHTMLBody & "Password: " & strPassword & "<br/>"
strHTMLBody = strHTMLBody & "Sent Date: " & date & "<br/><br/>"
oMail.Subject = "Here is Your Previous Password"
oMail.To = rs!txtEmailAddress
oMail.Send
Set oMail = Nothing
Set oApp = Nothing
End Sub