How to connect username and password in a database for more secure login?

What is the problem?

You don't know how to Connect to the DB? or you don't know how to retrieve?

What is the problem you are having.

Normally I would not help with sample code if NOTHING has been given, but hey, what the heck.... Please give us MORE info next time, like what YOU have coded so far etc.

Look at the attached for a sample...

patishere,
you are lucky since AndreRet gave you sample code without seeing your effort. As said by AndreRet we don't give full source code before seeing your hard work. I hope AndreRet's help will be helpful.

thankx

commented: Keep it up +1

How to connect username and password in a database for more secure login?

yeah.. your lucky.. hehe.. maybe you can use encryption method in your application for it if you want it secured.

Oops sorry for that. I know how to code simple login but I want more secure like connecting it with a database to check if username and password exist.

Okay here is my simple login code.

Private Sub Command1_Click()
Dim login As Integer
Text2.SetFocus

If Text1.Text = Text1.Tag And Text2.Text = Text2.Tag Then
intResponse = MsgBox("Username and Password Matched", vbInformation, "iWeb Browser", 3, 1)
passfrm.Hide
rules1frm.Show
passfrm.Hide

ElseIf (Text1.Text = "") And (Text2.Text = "") Then
intResponse = MsgBox("What are you trying to do?", vbCritical + vbOKOnly, "Warning!")
intResponse = MsgBox("Please Enter Correct Password!", vbCritical + vbOKOnly, "iWeb Browser")
Text1.Text = ""
Text1.SetFocus
Else
intResponse = MsgBox("Password is incorrect!", vbCritical + vbRetryCancel, "iWeb Browser")
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Text1.BackColor = vbYellow
Text2.BackColor = vbYellow
End If
End Sub