Sunday, 14 October 2018

Forgot Password



Form 8 code



Option Explicit

Private Sub Command1_Click()
Module1.retdata ("select upass from Admin where uname='" & txtuname.Text & "' and sans='" & Text1.Text & "'")
If rs.RecordCount > 0 Then
MsgBox ("Your Password Is" & rs.Fields(0).Value)
Else
MsgBox ("Wrong Answer")
End If


End Sub

Private Sub Form_Load()

End Sub

Private Sub txtuname_LostFocus()
Module1.retdata ("select sques from Admin where uname='" & txtuname.Text & "'")
If Not rs.EOF Then
lblq.Caption = rs.Fields(0).Value
Else
MsgBox ("No Such User")
End If

End Sub