K
Keith G Hicks
Wasn't getting any answers in "commandbarsui" NG so I moved it here. Hope
someone can help!
In the application I'm building I run most of the main forms with the
following settings
border = Dialog
Popup = True
I have toolbars that I've built (not as macros, but as actual toolbars) that
need to show or hide depending on which form is up. For example if Form1 has
the focus, Toolbar1 should appear in the main access window menu area (not
on the form itself). If Form2 has the focus (Form1 could still be running),
Toolbar1 should vanish and Toolbar2 should appear in the main access window
menu area (again, not on the form itself). I've tried so many things like
the following (and in other events as well - OnGotFocus, OnLoad, etc.)
Private Sub Form_Activate()
Dim i As Integer
For i = 1 To CommandBars.Count
If CommandBars(i).Name = "mnuClientDetail" Then
CommandBars(i).Enabled = True
End If
Next i
End Sub
or
Private Sub Form_Activate()
DoCmd.ShowToolbar "mnuClientDetail", acToolbarYes
End Sub
I've also tried setting the menu bar property of the form.
I should also note that when this program is in production, I have all the
startup features unchecked (show database window, full menus, etc).
The above ONLY seem to work if the form is NOT popup and NOT Dialog. There
has to be a way to do what I need here. Does anyone have any suggestions?
(other than using macros for the menus). I need some really good direction
on all of this. It's very unintuitive.
Thanks,
Keith
someone can help!
In the application I'm building I run most of the main forms with the
following settings
border = Dialog
Popup = True
I have toolbars that I've built (not as macros, but as actual toolbars) that
need to show or hide depending on which form is up. For example if Form1 has
the focus, Toolbar1 should appear in the main access window menu area (not
on the form itself). If Form2 has the focus (Form1 could still be running),
Toolbar1 should vanish and Toolbar2 should appear in the main access window
menu area (again, not on the form itself). I've tried so many things like
the following (and in other events as well - OnGotFocus, OnLoad, etc.)
Private Sub Form_Activate()
Dim i As Integer
For i = 1 To CommandBars.Count
If CommandBars(i).Name = "mnuClientDetail" Then
CommandBars(i).Enabled = True
End If
Next i
End Sub
or
Private Sub Form_Activate()
DoCmd.ShowToolbar "mnuClientDetail", acToolbarYes
End Sub
I've also tried setting the menu bar property of the form.
I should also note that when this program is in production, I have all the
startup features unchecked (show database window, full menus, etc).
The above ONLY seem to work if the form is NOT popup and NOT Dialog. There
has to be a way to do what I need here. Does anyone have any suggestions?
(other than using macros for the menus). I need some really good direction
on all of this. It's very unintuitive.
Thanks,
Keith