Hi,
I have made a report ("Timings Report") which opens on the click of a button from a separate form ("Progress Form"). The report has a print button which opens the print dialog box for the user.
The problem I am having is concerning the button on my form - when I click it, instead of opening the report, it just automatically prints the report. The code for click command on both is below...
Private Sub cmdTimingsReport_Click()
'Code runs when Progress Report command button is clicked
DoCmd.OpenReport ("Timings Report")
End Sub
Private Sub cmdPrint_Click()
'On pressing this button, the print dialog box opens
DoCmd.RunCommand acCmdPrint
End Sub
Another problem I have been having with the code (which isn't as major) is on printing, the print command button still prints. I have tried using the cmdPrint.Visible = False statement but I just get an error: "You can't hide a control that has the focus."
Thanks in advance
AA93