Results 1 to 3 of 3
  1. #1
    Mehvan's Avatar
    Mehvan is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    133

    Post send password in Ms access to email

    Hello everyone



    I have a question about sending password from Ms Access to Email (Yahoo)
    I have a project in Ms Access , many users using it , and of course everyone will has special ( Name and Password )
    I would like to create one form , if someone forget his/her password , He will tell manager about password
    manager will go to that form and will enter his email Yahoo , will send password to his Email yahoo

    Am I can do it in Microsoft Access , because Yahoo should has network even We can work on Yahoo , and Microsoft Access doesn't work with network now , I mean my Ms Access project .

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    you can skip this by just using Window Login authentication.
    Their windows login/password is the same used for the access db.
    Keep the userID table as the list of users allowed to be in the db, but no need to keep passwords.

    Code:
    SUB btnLogin_Click()
    Dim sUser As String, sPass As String, sDom As String
    
    sUser = txtUser
    sPass = txtPass
    sDom = "CoDomain"
    
    if sUser = Dlookup("userid","tUsers","[userid]='" & sUser & "'") then
    If WindowsLogin(sUser, sPass, sDom) Then
       mbSafe = True
       DoCmd.OpenForm "frmMainMenu"
       DoCmd.OpenForm "frmLogin"
       DoCmd.Close
    Else
       MsgBox "LOGIN INCORRECT", vbCritical, "Bad userid or password"
    End If
    end if
    end sub
    
    '-----------------
    Public Function WindowsLogin(ByVal strUserName As String, ByVal strpassword As String, ByVal strDomain As String) As Boolean
    '-----------------
    
            'Authenticates user and password entered with Active Directory.
    
            On Error GoTo IncorrectPassword
            
            Dim oADsObject, oADsNamespace As Object
            Dim strADsPath As String
            
            strADsPath = "WinNT://" & strDomain
            Set oADsObject = GetObject(strADsPath)
            Set oADsNamespace = GetObject("WinNT:")
            Set oADsObject = oADsNamespace.OpenDSObject(strADsPath, strDomain & "\" & strUserName, strpassword, 0)
            
            WindowsLogin = True    'ACCESS GRANTED
            
    ExitSub:
            Exit Function
            
    IncorrectPassword:
            WindowsLogin = False   'ACCESS DENIED
            Resume ExitSub
    End Function

  3. #3
    Mehvan's Avatar
    Mehvan is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    133
    thanks a lot ,,, I will try to apply it

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 05-10-2014, 12:50 PM
  2. Replies: 5
    Last Post: 05-07-2014, 09:25 AM
  3. How can I send an email from access???
    By Asma in forum Programming
    Replies: 2
    Last Post: 12-07-2011, 07:49 AM
  4. VBA to Send email from Access
    By ped in forum Access
    Replies: 3
    Last Post: 08-11-2011, 05:37 PM
  5. Send email from Access thru Outlook
    By ZMAN in forum Forms
    Replies: 2
    Last Post: 11-27-2010, 06:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums