How to detect user's password expiry date in ms access
2 posters
Page 1 of 1
How to detect user's password expiry date in ms access
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
- Posts : 94
Points : 172
Join date : 2013-12-14
Re: How to detect user's password expiry date in ms access
Thanks for this usefull post.....
wasif- New member
- Posts : 23
Points : 39
Join date : 2014-01-18
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|