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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
| Option Compare Database
Private Sub Form_Current()
Modifiable86 = Matricule 'Met à jour la zone de liste Trouver enregistrement.
End Sub
Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec
End Sub
Private Sub Modifiable86_AfterUpdate()
' Rechercher l'enregistrement correspondant au contrôle.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Matricule] = '" & Me![Modifiable86] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub B_back_Click()
On Error GoTo Err_B_back_Click
DoCmd.GoToRecord , , acPrevious
Exit_B_back_Click:
Exit Sub
Err_B_back_Click:
MsgBox Err.Description
Resume Exit_B_back_Click
End Sub
Private Sub B_next_Click()
On Error GoTo Err_B_next_Click
DoCmd.GoToRecord , , acPrevious
Exit_B_next_Click:
Exit Sub
Err_B_next_Click:
MsgBox Err.Description
Resume Exit_B_next_Click
End Sub
Private Sub B_add_Click()
On Error GoTo Err_B_add_Click
DoCmd.GoToRecord , , acNewRec
Exit_B_add_Click:
Exit Sub
Err_B_add_Click:
MsgBox Err.Description
Resume Exit_B_add_Click
End Sub
Private Sub B_esc_Click()
On Error GoTo Err_B_esc_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
Exit_B_esc_Click:
Exit Sub
Err_B_esc_Click:
MsgBox Err.Description
Resume Exit_B_esc_Click
End Sub
Private Sub B_save_Click()
On Error GoTo Err_B_save_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Exit_B_save_Click:
Exit Sub
Err_B_save_Click:
MsgBox Err.Description
Resume Exit_B_save_Click
End Sub
Private Sub B_delete_Click()
On Error GoTo Err_B_delete_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_B_delete_Click:
Exit Sub
Err_B_delete_Click:
MsgBox Err.Description
Resume Exit_B_delete_Click
End Sub
Private Sub B_suivant_Click()
On Error GoTo Err_B_suivant_Click
DoCmd.GoToRecord , , acNext
Exit_B_suivant_Click:
Exit Sub
Err_B_suivant_Click:
MsgBox Err.Description
Resume Exit_B_suivant_Click
End Sub |