ce code est parfait dans toutes les interfaces
il parait que le problème existe sur le passage des données de l'interface vers la base access
dta.Update(dts, "passage")
Imports System Imports System.Data Imports System.Data.OleDb Imports Microsoft.VisualBasic Public Class saissecure Private cmdb As OleDbCommandBuilder, cnx As OleDbConnection, rn As Integer, cmd As OleDbCommand, dta As OleDbDataAdapter, dtt As New DataTable, dts As New DataSet, sql As String, cnxstr As String, dtr As DataRow Private Sub saissecure_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cnxstr = "provider=microsoft.jet.oledb.4.0;data source=" & Application.StartupPath & "\shopping.mdb;" cnx = New OleDbConnection cnx.ConnectionString = cnxstr cnx.Open() rn = 0 sql = "select * from passage" cmd = New OleDbCommand(sql) dta = New OleDbDataAdapter(cmd) dts = New DataSet cmd.Connection() = cnx dta.Fill(dts, "passage") dtt = dts.Tables("passage") ComboBox1.DataSource = {"Administrator", "User"} TextBox2.Enabled = False TextBox3.Enabled = False ComboBox1.Enabled = False Button3.Enabled = False Button2.Enabled = False If dtt.Rows.Count > 0 Then TextBox1.Text = dtt.Rows(rn).Item("N°user") TextBox2.Text = dtt.Rows(rn).Item("login") TextBox3.Text = dtt.Rows(rn).Item("password") ComboBox1.Text = dtt.Rows(rn).Item("user") Else TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" ComboBox1.Text = "" TextBox2.Focus() End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox2.Enabled = True TextBox3.Enabled = True ComboBox1.Enabled = True Button3.Enabled = True Button2.Enabled = True Button1.Enabled = False TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" ComboBox1.Text = "" TextBox2.Focus() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If TextBox2.Text "" Or TextBox3.Text "" Or ComboBox1.Text = "" Then MsgBox("Pleas Type All informations", MsgBoxStyle.Information, "Information") Else dtr = dts.Tables("passage").NewRow dtr("login") = Me.TextBox2.Text dtr("password") = Me.TextBox3.Text dtr("user") = Me.ComboBox1.Text dts.Tables("passage").Rows.Add(dtr) cmdb = New OleDbCommandBuilder(dta) dta.Update(dts, "passage") dts.Clear() dta.Fill(dts, "passage") dtt = dts.Tables("passage") TextBox2.Enabled = False TextBox3.Enabled = False ComboBox1.Enabled = False Button3.Enabled = False Button2.Enabled = False Button1.Enabled = True TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" ComboBox1.Text = "" End If End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" ComboBox1.Text = "" TextBox2.Focus() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Me.Close() cnx.Close() dts = Nothing Menu11.Enabled = True Menu11.TopMost = True End Sub End Class