🔒 Closed Help naman dyan sa vb6

Status
Not open for further replies.

BlacksheepHD

Established
Private Sub loginbtn_Click()
loginado.RecordSource = "Select * from Log where Username ='" + txtuser.Text + "' and password='" + txtpass.Text + "' "
loginado.Refresh
If loginado.Recordset.EOF Then
MsgBox "Failed to login", vbCritical, "Message"
Welcome.Show
txtuser.Text = ""
txtpass.Text = ""
Else
MsgBox "Login Successful", vbInformation, "Message"
Main.Show
Welcome.Hide
End If
End Sub
==================================================

ano dapat ilagay ko para maging 3 attempt lang yung login? Hindi ko kase mapagana kapag may database eh. vb6 din to kaya hirap gawin. Pahelp naman po sana salamatttt
 
logic nyan pag Error yung password mag bibilang sya gang 3 then mala lock yung account pero ewan ko kung anu gusto ming gawin
 
Declare ka ng variable na maghahandle nung count example variable (a=0)
if wrongpass then
code here (Check value of a)
if value of a is less than 3 add 1 sa current val
else closetheprogram
else messagebox success login


pag aralan mo lang nested if else
 
If loginado.Recordset.EOF Then
MsgBox "Failed to login", vbCritical, "Message"
Welcome.Show
txtuser.Text = ""
txtpass.Text = ""
Lagay ka dito ng a+1


Gaya nung sinabi ng nasa taas ko
 
Status
Not open for further replies.

About this Thread

  • 7
    Replies
  • 594
    Views
  • 4
    Participants
Last reply from:
GreyPhantom

Online now

Members online
1,025
Guests online
692
Total visitors
1,717

Forum statistics

Threads
2,276,966
Posts
28,973,387
Members
1,229,669
Latest member
zeeeee345
Back
Top