Thaaanks, to you two. the thing is finished. i still have to filter an error that seems to loop but it works!
Here is what I did Zameer, the option from the site you gave me is very interesting but not for what I want, I prefer direct buttons from the form because my users want it easy:
This is the module:
Function OpenBlowersAll()
Dim ReportName As String
ReportName = "Blowers"
If MsgBox("Print now?", vbYesNo) = vbYes Then
DoCmd.OpenReport ReportName, acViewPreview, "MOTOR All"
DoEvents
DoCmd.RunCommand acCmdPrint
End If
End Function
and this is the code for the button in the form:
Private Sub RepBlowers_Click()
On Error GoTo Err_RepBlowers_Click
Call OpenBlowersAll
Exit_RepBlowers_Click:
Exit Sub
Err_RepBlowers_Click:
MsgBox Err.Description
Resume Err_RepBlowers_Click
End Sub
If the user click on 'Yes' for printing but then cancels the printing on the printers window, the error window keeps appearing, I don't know why because this is how I've been filtering all my other errors and they always work. any idea why this may be happening?