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
|
Private Sub AFFICHER_Click()
On Error GoTo Err_AFFICHER_Click
Dim SousFormulaire As String
Dim Critère As String
SousFormulaire = "sf_reception"
If IsNull(DateDébut) Or IsNull(DateFin) Then
MsgBox "Veuilliez sélectionner deux dates"
Else
If DateFin < DateDébut Then
MsgBox "la deuxième date doit etre posterieur à la première"
Critère = "[DateRéception]>=" & "#" & DateAng(Me![DateDébut]) & _
"#" & " AND " & "[DateRéception]<=" & _
"#" & DateAng(Me![DateFin]) & "#"
DoCmd.OpenForm SousFormulaire, , , Critère, , acDialog
End If
End If
Exit_AFFICHER_Click:
Exit Sub
Err_AFFICHER_Click
MsxBox Err.Description
Resume Exit_AFFICHER_Click
End Sub |
Partager