1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
If Val(Dates.Value) = Val(Date.Today) Then
command.Parameters("@dates").Value = ""
Else
command.Parameters.Add(New OleDbParameter("@dates", OleDbType.Date))
command.Parameters("@dates").Value = CType(Dates.Text, Date)
End If
If Val(Dates.Value) > Val(Datef.Text) Then
MsgBox("La date de signature de l'abonnement doit être inférieure à la date fin")
Exit Sub
End If
If Val(Datef.Value) = Val(Date.Today) Then
command.Parameters("@datef").Value = ""
Else
command.Parameters.Add(New OleDbParameter("@datef", OleDbType.Date))
command.Parameters("@datef").Value = CType(Datef.Text, Date)
End If |