Sub NouvCli()
  Dim NomC As String, ff As Object
  Set Donnes = CreateObject("Scripting.Dictionary")
  Set Cnx = CurrentProject.Connection
  Set Rst = New ADODB.Recordset
  Rst.Open "Clients", Cnx, adOpenDynamic, adLockOptimistic
  satisf = False
  DoCmd.OpenForm "Nouveau Client", , , , acFormAdd, acDialog
  If satisf Then
    Rst.AddNew
    For Each ff In Rst.Fields
      NomC = ff.Name
      If NomC <> "N" Then ff.Value = Donnes(NomC)
    Next
    Rst.Update
  End If
  Donnes.RemoveAll: Set Donnes = Nothing
  Rst.Close: Cnx.Close
  Set Rst = Nothing: Set Cnx = Nothing
End Sub

Private Sub B_OK_Click()
  Dim NomTB As String, ct As Control, vid As Boolean
  Dim Tx As String
  For Each ct In Controls
    If Left(ct.Name, 3) = "TB_" Then
      NomTB = Mid(ct.Name, 4)
      ct.SetFocus
      Tx = Nz(ct.Text, "")
      If Tx = "" Then vid = True Else Donnes.Add NomTB, Tx
    End If
  Next
  satisf = Not vid
  DoCmd.Close acForm, Me.Name, acSaveNo
End Sub
