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
| Dim intreponse As String
intreponse = MsgBox("Voulez vous enregistrer cette config", vbQuestion + vbYesNo, "Confirmer")
If intreponse = vbYes Then
If IsNull(Me!Nom_mother_board) Then
MsgBox "le nom mother_board est opbligatoire", vbExclamation
Me.Nom_mother_board.SetFocus
End If
If IsNull(Me!Nom_daughter_board) Then
MsgBox "le nom du daughter_board est obligatoire", vbExclamation
Me.Nom_daughter_board.SetFocus
End If
If IsNull(Me!Nom_VTT) Then
MsgBox "le nom du VTT est obligatoire", vbExclamation
Me.Nom_VTT.SetFocus
End If
If IsNull(Me!Nom_testeur) Then
MsgBox "le nom du testeur est obligatoire", vbExclamation
Me.Nom_testeur.SetFocus
End If
If IsNull(Me!Nom_activité) Then
MsgBox "le nom de l'activité est obligatoire", vbExclamation
Me.Nom_activité.SetFocus
End If
If IsNull(Me!Nom_Client) Then
MsgBox "le nom du client est obligatoire", vbExclamation
Me.Nom_Client.SetFocus
End If
If IsNull(Me!Nom_programme) Then
MsgBox "le nom du programme est obligatoire", vbExclamation
Me.Nom_programme.SetFocus
End If
If IsNull(Me!Nom_composant) Then
MsgBox "le nom du composant est obligatoire", vbExclamation
Me.Nom_composant.SetFocus
End If
End If
DoCmd.RunCommand acCmdSaveRecord
intreponse = MsgBox("C'est enregistré..." & vbCrLf & "Voulez vous enregistrer une autre config", vbQuestion + vbYesNo, "Nouveau")
If intreponse = vbYes Then
DoCmd.GoToRecord , , acNewRec
Else
DoCmd.Close acForm, Me.Name
End If
End Sub |
Partager