Access BooK
Before start posting on this forum you must Login. If you are a new user, kindly register first.

Join the forum, it's quick and easy

Access BooK
Before start posting on this forum you must Login. If you are a new user, kindly register first.
Access BooK
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How to detect user's password expiry date in ms access

2 posters

Go down

How to detect user's password expiry date in ms access Empty How to detect user's password expiry date in ms access

Post by Mani786 Wed Sep 14, 2016 10:44 pm

How to detect user's password expiry date and check that how many days left before password expiry in ms access ,Here is a code:
Code:

Dim ExpiryDate As Variant
Dim intDaysLeft As Integer
 
If IsNull(Me![txtUser]) Then Exit Sub
 
ExpiryDate = DLookup("[Next_PWD_Change_Date]", "tbl_Users", "[User_name] = '" & _
                              Me![txtUser] & "'")
 
If Not IsNull(ExpiryDate) Then
  intDaysLeft = DateDiff("d", Now(), CDate(ExpiryDate))
  Select Case intDaysLeft
    Case Is <= 0
    MsgBox "Your password has expired. You must change it now.", vbExclamation + vbOKOnly, "Expired Password"
    Case Is <= 10
      MsgBox "You Password will expire in " & intDaysLeft & " days, please " & _
             "change your password.", vbExclamation, "Password Expiration Notice"
    Case Is >= 30
    'DO NOTHING
    'MsgBox "No need to change"
  End Select

End If

Mani786
New member
New member

Posts : 94
Points : 172
Join date : 2013-12-14

Back to top Go down

How to detect user's password expiry date in ms access Empty Re: How to detect user's password expiry date in ms access

Post by wasif Sat Sep 24, 2016 8:32 pm

Thanks for this usefull post.....

wasif
New member
New member

Posts : 23
Points : 39
Join date : 2014-01-18

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum