hi guys , i need some hlp.
I am hidding all the toolbars when a user loging into the database, with the following code:
The problem comes when a user select a report from the main menu. i open the report like this:
BUT because i hide the toolbars, they can not print the report.
i tryied creating a tool bar and using this code when the report is open but nothing happened:
In addition, i tryed adding on report_close the following code:
as a result i got an error : "run-time 2585 . This action can not be carried out while processing a form or report event"
Can somebody tell me how i can let the user print the report using vB code?
thx very much, max.
I am hidding all the toolbars when a user loging into the database, with the following code:
Code:
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = True
MsgBox i
Next i
The problem comes when a user select a report from the main menu. i open the report like this:
Code:
DoCmd.OpenReport "reportname", acViewPreview, acWindowNormal
BUT because i hide the toolbars, they can not print the report.
i tryied creating a tool bar and using this code when the report is open but nothing happened:
Code:
docmd.showtoolbar "E-Wine", actoolbaryes
In addition, i tryed adding on report_close the following code:
Code:
vqueres = MsgBox("Do you want to print this report?", vbYesNo)
If vqueres = vbYes Then
DoCmd.RunCommand acCmdPrint
End If
Can somebody tell me how i can let the user print the report using vB code?
thx very much, max.
Last edited: