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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| Imports System
Imports System.Data.OleDb
Imports System.IO
Public Class Form2
Dim choix As Integer
Dim numdossier As String
Private Sub btn_fin_Click(sender As Object, e As EventArgs) Handles btn_fin.Click
Dim myConnection As OleDbConnection
Dim myCommand As OleDbCommand
Dim mySQLString As String
myConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\user\Documents\processus_anomalies.accdb")
myConnection.Open()
MsgBox(myConnection.State)
mySQLString = "INSERT INTO processus_anomalies(workfile_realise,numero_dossier) VALUES (M,numdossier)"
myCommand = New OleDbCommand(mySQLString, myConnection)
myCommand.ExecuteNonQuery()
End Sub
Private Sub TB_numdossier_TextChanged(sender As Object, e As EventArgs) Handles TB_numdossier.TextChanged
numdossier = TB_numdossier.Text
End Sub
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
choix = 0
End Sub
Private Sub RB1_1_Click(sender As Object, e As EventArgs) Handles RB1_1.Click
choix = 1
End Sub
Private Sub RB1_2_CheckedChanged(sender As Object, e As EventArgs) Handles RB1_2.CheckedChanged
choix = 2
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Btn_1.Click
Select Case choix
Case 1
Dim M As String = InputBox("Date fin de tâche", "Timing")
TB1.Text = M
TB1.TextAlign = HorizontalAlignment.Center
TB1.BackColor = Color.Green
Case 2
Dim N As String = MsgBox("Bon courage!", vbInformation + vbOKOnly, "Rappel")
End Select
End Sub
End Class |
Partager