Citation Envoyé par tee_grandbois Voir le message
certainement un état déjà ouvert ou en mémoire
Donc il faut l'OpenReport
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
Private Sub print_invent_Click()
Dim stNomEtat As String
stNomEtat = "ETAT inventaire"
 
If MsgBox("Voulez vous imprimer ?", vbYesNo) = vbYes Then
    DoCmd.OpenReport stNomEtat, acViewPreview
    DoCmd.OutputTo acOutputReport, stNomEtat, acFormatPDF, , False
    DoCmd.PrintOut acPrintAll
Else
    DoCmd.OpenReport stNomEtat, acViewPreview
End If
 
End Sub
cela fonctionne
Merci