Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lost toolbar

Status
Not open for further replies.

GPM4663

Technical User
Aug 9, 2001
165
GB
Hi,
I have a database that hides the access window on open to use forms but unhides it when opening reports so that they will display. My only problem is that the custom made toolbar for each report doesn't display if it is opened in Access XP but will display if opened in Access 2000. The database is in Access 2000 format but I can't control what people are opening it with. Is there a way around this?

Many thanks,

G
 
If you on the reports properties, under "Other" select toolbar this tool bar will be shown when ever opend.

Herman
Say no to macros
 
Hi Herman,
I already have that selected but unfortunately it doesnt' show up when using access xp? Any other ideas?

Thanks

GPM
 
In the "Startup" setup (Tools/Startup) is the toolbar set to something other than (Default) ?

Sub GetTheBar(TBar As String)
'On Error Resume Next
Dim MyBar
Set MyBar = Application.CommandBars(TBar)
MyBar.Visible = True
End Sub

Call the above on the reports onopen event, like:
GetTheBar YrToolBar

Herman
Say no to macros
 
Hi Herman,
Have checked the startup and it is set for default and allow built in toolbars is also set. I've inserted your code as well but it still won't display. I've copied the code I'm using for hiding the access window incase that has anything to do with it.

thanks

GPM

Option Compare Database

Private Declare Function IsWindowVisible Lib "user32" (ByVal hWnd As Long) As Long
Dim dwReturn As Long

Const SW_HIDE = 0
Const SW_SHOWNORMAL = 1
Const SW_SHOWMINIMIZED = 2
Const SW_SHOWMAXIMIZED = 3

Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, _
ByVal nCmdShow As Long) As Long

Public Function fAccessWindow(Optional Procedure As String, Optional SwitchStatus _
As Boolean, Optional StatusCheck As Boolean) As Boolean

If Procedure = "Hide" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
End If

If Procedure = "Show" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
End If

If Procedure = "Minimize" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMINIMIZED)
End If

If SwitchStatus = True Then
If IsWindowVisible(hWndAccessApp) = 1 Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
Else
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
End If
End If

If StatusCheck = True Then
If IsWindowVisible(hWndAccessApp) = 0 Then
fAccessWindow = False
End If

If IsWindowVisible(hWndAccessApp) = 1 Then
fAccessWindow = True
End If
End If

End Function

 
Have tried:

Code:
DoCmd.ShowToolbar "Mytoolbarname", acToolbarYes

EasyIT
 
No the hiding of the access bd window does not look like it has something to do with this problem.

It sounds like there is a problem with this toolbar as such, what it could be I'll never know.

1. Try to make a new database container (in XP but in A2K "mode") import a report into this, be sure to set this import to also import menu and toolbars.

2. Can you, by right cliking on the menubar select this toolbar.

Herman
Say no to macros
 
Hi All,
I've tried all of your suggestions but still can't get it to work. I've even tried calling up a standard "Print Preview" toolbar but to no avail!!

Any further comments would really be appreciated

thanks,

GPM
 
2. Can you, by right cliking on the menubar select this toolbar.

Herman
Say no to macros
 
Ok Solved it,
I had the report set as popup and by removing this it allowed the toolbar to be displayed.

Thanks for all your help guys,

GPM
 
:-D - I would never have gussed.... a report as popup, never heard of it before.
But why would it show in A2K ? hmmmm just one of those things... in m$!

Herman
Say no to macros
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top