Toolbar in pop up window

M

Michalis J.

Is there a way to activate a toolbar when a report opens in pop up mode?
I need to open the report in popup window so that it appears on top of all
other objects but in order to print or view in design mode I have to right
click the mouse. I have a standard toolbar for reports which I want to use.
Thanks in advance

Michalis
 
J

John Spencer

If you mean you are opening the report with Window Mode set to acDialog, then
the answer is NO. Menus and menubars can be displayed but you can't use them
when you are in Dialog mode.


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
M

Michalis J.

In report properties I set "pop up" to "yes" so that the report appears in
front of other open forms. I select the toolbar I want to use at the report
properties "toolbars" but it does not appear.
 
J

John Spencer

Interesting. I see what happens when you do this and I have no solution to
the problem. You may be able to activate the appropriate menu in the code you
are using to open the report and remove the menu using the reports close event.

I will have to experiment when I have some time.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
J

John Spencer

I found a work around (not fully tested) that will show a toolbar. I used
code in the Open and Close events to show/hide the toolbar.

I thought that the Activate and Deactivate events might be more appropriate,
but they did not work as expected. So my sample code looks like

Private Sub Report_Close()
CommandBars("Custom Print Preview").Visible = False
End Sub

Private Sub Report_Open(Cancel As Integer)
CommandBars("Custom Print Preview").Visible = True
End Sub


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
M

Michalis J.

Thanks a lot for your reply John. I have tried your code using the toolbar
name at your "Custom Print Preview" if this is what you mean but still the
toolbar does not appear. I have also used the code
DoCmd.ShowToolbar "REPORTOOLS", acToolbarYes
with no result either.
 
J

John Spencer

It worked for me. "Custom Print Preview" is the name of one of my toolbars.

Make sure you have spelled the name of the toolbar correctly. For instance, I
would have named the toolbar ReportTools and not Reportool (note the double T).



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top