ادري ان المشروع ليس تماما كما تريد لكن احببت المشاركة فقط
وهذا باستخدام أكسس
دمج المشاركات مشكلة

PHP كود :
Public Class Form2
Dim dbpath As String = IO.Path.GetDirectoryName(Application.ExecutablePath) & "\db.accdb"
Dim str As String = "provider=microsoft.ace.oledb.12.0;data source=" & dbpath
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Using con As New OleDb.OleDbConnection(str)
Using cm As New OleDb.OleDbCommand("select min(t) from tb", con)
If con.State = ConnectionState.Closed Then con.Open()
If IsDBNull(CDate(cm.ExecuteScalar).ToShortTimeString) = False Then
TextBox1.Text = CDate(cm.ExecuteScalar).ToShortTimeString
End If
If con.State = ConnectionState.Open Then con.Close()
End Using
End Using
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Using con As New OleDb.OleDbConnection(str)
Using cm As New OleDb.OleDbCommand("select max(t) from tb", con)
If con.State = ConnectionState.Closed Then con.Open()
If IsDBNull(CDate(cm.ExecuteScalar).ToShortTimeString) = False Then
TextBox2.Text = CDate(cm.ExecuteScalar).ToShortTimeString
End If
If con.State = ConnectionState.Open Then con.Close()
End Using
End Using
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Using con As New OleDb.OleDbConnection(str)
Using cm As New OleDb.OleDbCommand("insert into tb(t) values(@t)", con)
cm.Parameters.Clear()
cm.Parameters.AddWithValue("@tn", dt.Value)
If con.State = ConnectionState.Closed Then con.Open()
Try
cm.ExecuteNonQuery()
MsgBox("تم")
Catch ex As Exception
MsgBox(Err.Description, MsgBoxStyle.Critical, "")
End Try
If con.State = ConnectionState.Open Then con.Close()
End Using
End Using
End Sub
End Class
هذا هو فورم التعامل مع اكسس
اللهم إني أعوذ بك من غلبة الدين وغلبة العدو، اللهم إني أعوذ بك من جهد البلاء ومن درك الشقاء ومن سوء القضاء ومن شماتة الأعداء
اللهم اغفر لي خطيئتي وجهلي، وإسرافي في أمري وما أنت أعلم به مني، اللهم اغفر لي ما قدمت وما أخرت، وما أسررت وما أعلنت وما أنت أعلم به مني، أنت المقدم وأنت المؤخر وأنت على كل شيء قدير

