Dear Blackknight,
Your problem is genuine for any beginner. you can use the following to add new record through add button.
Dim con As New ADODB.Connection
Dim tmp As New ADODB.Recordset
Dim s As String
con.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=K:\Database\db1.mdb"
con.Open()
s = "select * from add1"
tmp.Open(s, con, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockPessimistic)
tmp.AddNew()
tmp.Fields("ID").Value = T18.Text
tmp.Fields("Salutation").Value = T1.Text
tmp.Fields("Fname").Value = T2.Text
tmp.Fields("Mname").Value = T3.Text
tmp.Fields("Lname").Value = T4.Text
tmp.Fields("Degree").Value = T5.Text
tmp.Fields("Category").Value = T6.Text
tmp.Fields("Position").Value = T17.Text
tmp.Fields("Org").Value = T16.Text
tmp.Update()
MsgBox("Record Saved")
Exit Sub
To display data in data grid you have to drag datagridview dataset and databinding source from the tool box and connect it to a data base. you can then write following code in the search button to show the items in the datagrid from the access table.
Db1DataSet1.Clear()
the aforementioned search option is by first name you can change accordingly your field names creating different forms and creating the links of those forms in a single menu form.
If any problem persists, ask me.
Regards
Kshiteesh
Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=K:\Database\db1.mdb"
Dim con As OleDb.OleDbConnection = New OleDb.OleDbConnection(conStr)
Dim S As String
Dim datagrid1 As New DataGrid
S = "select * from add1 where fname='" & TextBox1.Text & "'"
Dim da As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter(S, con)
da.Fill(Db1DataSet1, "add1")
datagrid1.DataSource = Db1DataSet1.DefaultViewManager