1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| Private Sub Command1_Click()
If RS.State = adStateOpen Then RS.Close
If Option1.Value = True And Check1.Value = 1 Then
RS.Open "Insert Into Table1 In'" & App.Path & "\Base1.mdb" & "'" & " Select * From [Français$]", XL, adOpenDynamic, adLockOptimistic
MsgBox "Transfert réussi", vbInformation, "INFOS"
Else: MsgBox "Vous devez choisir l'année et la classe", vbInformation, "INFOS"
End If
End Sub
Private Sub Command2_Click()
PoolConnection
Set DB = New ADODB.Connection
Set RS1 = New ADODB.Recordset
If RS1.State = adStateOpen Then RS1.Close
If Option1.Value = True And Check1.Value = 1 Then
RS1.Open "Insert Into Table1 In '" & App.Path & "\Base1.mdb" & "'" & " Select * From [Math$]", XL, adOpenDynamic, adLockOptimistic
MsgBox "Transfert réussi", vbInformation, "INFOS"
Else: MsgBox "Vous devez choisir l'année et la classe", vbInformation, "INFOS"
End If
End Sub |
Partager