1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
Dim Cat As ADOX.Catalog
Dim MaTableIndex As ADOX.Table
Dim NomTable As String
Set Cat = CreateObject("ADOX.Catalog")
Cat.Create _
"Provider=Microsoft.Jet.OLEDB.3.51;Data Source=C:\Program files\PrjMarit\bdd1.mdb"
NomTable = TxtNumComm.Text '"MaTable"
Set MaTableIndex = CreateObject("ADOX.Table")
With MaTableIndex
.Name = NomTable
With .Columns
.Append "Date1", adDate
.Append "tension_obtenue", adSingle
End With
End With
With Cat
.Tables.Append MaTableIndex
End With
Set Cat = Nothing
Set MaTableIndex = Nothing
If LblAffichage.Caption > 0 Then
With adoMaTableIndex.Recordset
.AddNew
!Date1 = Date
!tension_obtenue = LblAffichage.Caption
.Update
.Save
.Requery
End If |
Partager