THIS IS THE CODE WHERE I CLICK A BUTTON TO SIGN UP FOR AN ACCOUNT
Set db = New ADODB.Connection
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0; Data Source=" & App.Path & "\useraccount.mdb"
Set rs = New ADODB.Recordset
rs.Open "Select*from useraccounts", db, adOpenStatic, adLockOptimistic
rs.AddNew
rs!Lastname = Text1.Text
rs!Firstname = Text2.Text
rs!Contact = Text3.Text
rs!UserName = Text4.Text
rs!Password = Text5.Text
rs!question = Text6.Text
rs!answer = Text7.Text
rs.Update
MsgBox "Account Successfully Created!", vbInformation, "Employee Registration Records..."
Form3.Hide
Form1.Show
THIS IS THE CODE WHERE I CLICK A BUTTON TO LOG IN
Set db = New ADODB.Connection
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0; Data Source=" & App.Path & "\useraccount.mdb"
Set rs = New ADODB.Recordset
rs.Open "Select*from useraccounts", db, adOpenStatic, adLockOptimistic
If Text1.Text = rs!UserName And Text2.Text = rs!Password Then
MsgBox "Welcome!!!", vbInformation, "Log-in"
Form2.Show
Else
MsgBox "Username or Password is Incorrect! You Cannot Access The Program. Register first!", vbExclamation, "Log-in Version 2.0.."
With Text1
.Text = ""
.SetFocus
End With
Text2.Text = ""
Text3.Text = Val(Text3.Text) + 1
End If
End Sub
on the above codes they all have
Dim rs As New ADODB.Recordset
Dim db As New ADODB.Connection
the problem is it can't read the account created. what do you guys think is the problem.. please do help me. oh this is for VISUAL BASIC 6.0
THANKYOU GUYS FOR THE HELP!