Hi!
May i have a sample code for log in and password under vb6.
Please help....

Recommended Answers

All 7 Replies

It_Girl, I would gladly help, but we do have rules to abide by. What have you designed thus far? Are you stuck on a particular problem?

Reply to above and I will gladly give you some sample code.

Use search engine like google, yahoo.

Hey It Girl, first you going to need a table in Access to do it my way..
Call the table Users..with 'Username' and 'Password' field(populate the table with at least 2records)
Try out the code below editin where necessary..

dim counter as integer

Loginsucceeded = False
DataEnvironment.rsUsers.MoveFirst
Do While Not DataEnvironment.rsUsers.EOF
If TXTusername.Text = DataEnvironment.rsUsers.Fields!UserName Then

Loginsucceeded = True
frmmdi.Show
End If
DataEnvironment2.rsUsers.MoveNext

If txtpassword.Text = DataEnvironment.rsUsers.Fields!Password Then
Loginsucceeded = True
frmmdi.Show
Unload Me
End If
Exit Do
DataEnvironment.rsUsers.MoveNext
Loop

If Loginsucceeded = False Then

MsgBox "Invalid UserName Password Combination !", , "Login"
TXTusername.SetFocus
txtpassword.SetFocus

Counter = Counter + 1
If Counter = 2 Then
MsgBox "Password Trials Expired", vbExclamation, "Password Error"
Unload Me
End If
End If


End Sub

fourty

will you send me the sample code of the automated clinic management system?.. thank you.. i am really needing it.

commented: No, you are really needing to do your own homework or fail. -2

ey Arpee wat dyou really mean automated clinic mgt sys.. that is a whole lot of codes

Specify a code handling a specific item.. in the system.

Member Avatar for nssltd

Arpee you must show proof of your effor before others can help you also you should not jack other people's thread please start your own instead

Hi it_girl,
Go to this link http://www.daniweb.com/forums/thread287173.html and download 'Login Example with MS Access DB.zip' that I have uploaded. I hope you will learn something from that attachment.
For Arpee I would like to request to post your thread as new topic/thread so that your thread will get the answer.
Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.