help
I am writing an application in HTML using vbscript. The appication would check password and if the password is correct it will open another html page. How do I write the statement in vbscript? I would appreciate any help
Thanks
Software
I am writing an application in HTML using vbscript. The appication would check password and if the password is correct it will open another html page. How do I write the statement in vbscript? I would appreciate any help
Thanks
by kavitha_v_pillai Accepted solution
by unhappyuser Accepted solution
Private Sub txtpword_Exit(Cancel As Integer)
' Check username and password for access to database
Dim strquery As String
Dim FundName, varpass, varstatus As Variant
varpass = DLookup("[pword]", "userid", "[userid]='" & Me!txtuserid & "'")
If txtpword = varpass Then
FundName = DLookup("[fund name]", "form", "[formidlink]='" & Me!txtuserid & "'")
Me!labelfundname = FieldName
varstatus = DLookup("[userlevel]", "userid", "[userid]='" & Me!txtuserid & "'")
DoCmd.RunMacro "mcrsuccessfulQuery"
If varstatus = "Administrator" Then
Me!btnsecmenu.Visible = True
Me!labelsecmenu.Visible = True
Me!btnfinrpt.Visible = True
Me!labelfinrpt.Visible = True
Me!btnnotice.Visible = True
Me!labelnotice.Visible = True
'ElseIf varstatus = "Notice" Then
' Me!btnnotice.Visible = True
' Me!labelnotice.Visible = True
'ElseIf varstatus = "Report" Then
' Me!btnfinrpt.Visible = True
' Me!labelfinrpt.Visible = True
' Me!btnnotice.Visible = True
' Me!labelnotice.Visible = True
ElseIf varstatus = "name" Then
Me!btnnotice.Visible = True
Me!labelnotice.Visible = True
Me!btnfinrpt.Visible = True
Me!labelfinrpt.Visible = True
End If
Else
Me!btnsecmenu.Visible = False
Me!labelsecmenu.Visible = False
Me!btnfinrpt.Visible = False
Me!labelfinrpt.Visible = False
Me!btnnotice.Visible = False
Me!labelnotice.Visible = False
DoCmd.RunMacro "mcrfailurequery"
Msgbox "Invalid UserID or Password, Please try again"
End If
End Sub
This discussion is closed to new replies.
Sort by Trending