Preview Toolbar when a Report is opened from front end (1 Viewer)

Sreedevi

Registered User.
Local time
Today, 15:40
Joined
Oct 10, 2007
Messages
22
Hi

I want to have Preview toolbar when my report is opened on click of button from front end form.

What I am trying is, I have specified a query as the record source of the report. And in front end form on click of button I have called a macro that opens the report (Open Report) I have mentioned the Name of the report and the view as Print Preview in the macro. But this doesn't work.

Then along with the above procedure I tried this piece of code on open/Activate of report:-
DoCmd.ShowToolbar "Print Preview", acToolbarYes

Still doesnt work.

Now I am trying running the code through macro and the code is like:-

Dim strReportName As String

strReportName = "abc"
DoCmd.OpenReport strReportName, acPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdZoom100
DoCmd.ShowToolbar "Print Preview", acToolbarYes

but still it doesnt work.

Menu's of preview toolbar appears when we right click on the report,
I just want, what ever is there on the right click should appear as a toolbar.

Can someone suggest me something its really urgent. Even a small effort will be highly appreciated.
 

apr pillai

AWF VIP
Local time
Tomorrow, 04:10
Joined
Jan 20, 2005
Messages
735
Preview Toolbar

Try running the last line of code

DoCmd.ShowToolbar "Print Preview", acToolbarYes

from the On Open event of the Report, if you are not already doing it.

http://msaccesstips.com
 

Users who are viewing this thread

Top Bottom