Hi ,

I need help to answer the Assignment

Q1 : A) Once Buuton (Login) clicked, validate the contents of textbox1 and textbox2 , if textbox1=hct or HCT and textbox2 =it or textbox2=IT then display login sucessfully message and open form main in maximize mode, otherwise display error message,try again and allow user to re-enter user name and password within 1 minute.

this is easy...
1st of all that the timer in your login form. add the lobel (countdown)

login button code:

if textbox1.text = "HCT" and Textbox2.text = "IT" then
   timer1.stop()
   label1.text = "60"
   msgbox("Access Gained",,"")
Else
   msgbox("data don't match to our stored data" & vbnewline & "You can login within 1 min else you can't login for 24 hours", msgboxstyle.critical + msgboxstyle.Okonly, "error")
   Timer1.start()
   label1.text = "60"

Timer Code:

if Label1.text = 0 then
my.setting.expiredate = datestring
my.setting.save()
else
label1.text = label1.text - 1
end if

form1.load event

dim i as datestring
if not i = my.setting.expiredate then
'do nothing
else
msgbox("You havn't insert the code within 1 min. so your section is expire for 24 hours",msgboxstyle.critical,"")
ms.close
End If

I just add one more thing in the form (setting and expire/access cancelled for 24 hour) as many of my friend were on such situation and thereafter they did this and gained the access...so I place those code with this too

if you got solution then please upvote me with comment and mark the thread as solved

This article has been dead for over six months. Start a new discussion instead.