Bonjour
le bouton existant ne permettant pas de filtrer un état, je tente le VBA après des recherches sur le site, mais je cale!
voilà ma tentative....une bonne âme pour la corriger ....un grand merci d'avance
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 Private Sub Courriel_PDF_Click() On Error GoTo Courriel_Err Dim strNomDoc As String strNomDoc = "Bon de commande" DoCmd.OpenReport strNimDoc, acViewNormal, , "Filtre bon de commande", acHidden DoCmd.SendObject acReport, "Bon de commande", "PDFFormat(*.pdf)", "", "", "", "Commande de Nouvel arrondissement", "", True, "" Courriel_Exit: Exit Function Courriel_Err: If Err.Number <> 2501 Then Err.Raise Err.Number, , Err.Description Resume Courriel_Exit End Sub
Partager