🔒 Closed Help naman dyan sa vb6

Status
Not open for further replies.

BlacksheepHD

Eternal Poster
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
  • 597
    Views
  • 4
    Participants
Last reply from:
GreyPhantom

Trending Topics

Online now

Members online
1,005
Guests online
2,640
Total visitors
3,645

Forum statistics

Threads
2,288,902
Posts
29,055,042
Members
1,214,382
Latest member
janecute
Back
Top