I have a login form coded as :
Imports System.Data.OleDb
Public Class Form2
Dim ctr As Integer
Private Sub Ok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim con As New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source=C:/Users/Space Era/Documents/User.mdb")
Dim cmd As OleDbCommand = New OleDbCommand("SELECT * FROM Users WHERE userid = '" & TextBox2.Text & "' AND password = '" & TextBox1.Text & "' ", con)
con.Open()
Try
Dim sdr As OleDbDataReader = cmd.ExecuteReader()
' If the record can be queried, Pass verification and open another form.
If (sdr.Read() = True) Then
Form7.Show()
Me.Hide()
Else
MessageBox.Show("Invalid username or password!")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Oledb Error")
End Try
End Sub
' Cancel button
Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click
Me.Close()
End Sub
I wish to create a form for changing the password ,i.e., stored in the access database...any relevant replies would be appreciated..