Solved

Supremely Annoying...

Posted on 2006-07-05
4
167 Views
Last Modified: 2010-04-30
MDI Child forms which contain a menu override the MDI Parent forms menu. Is there any way to turn this off? I would like to have the MDI Parent's menu visible on the parent's form and then have the child form's menu visible on the child form. Is this possible?
0
Comment
Question by:DrDamnit
  • 3
4 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
create a activeX control with a menu, and put that on the mdi child form.
ensure the negociating values are properly set
0
 
LVL 17

Accepted Solution

by:
inthedark earned 500 total points
Comment Utility
Or.... put the Child menu on the main form and have it invisible.

 In the form_activate make the menu visible. In for form_deactivate make the menu invisible.

Hope this helps :~)
0
 
LVL 17

Expert Comment

by:inthedark
Comment Utility
Oh and forgot

In your MDI child you need to place the menu action commands in Public Subs like for example

Public Sub SaveData()
' to do place code here
End Sub

In the main form menu events:

Private Sub mnuSaveData()
   On Error Resume Next
   Screen.ActiveControl.SaveData
End Sub

This also works well for tool bar icons as well, say for example on a save command
button icon, you can activate the same code for global saves on all open mdi forms.

Private Sub cmd_Save()
Dim frm As frmMyMDIChild
For Each  frm in Forms
    On Error Resume Next
    frm.SaveData
Next

End Sub

0
 
LVL 17

Expert Comment

by:inthedark
Comment Utility
Sorry was very tired yesterday see ** below

Private Sub mnuSaveData()
   On Error Resume Next
   Screen.ActiveForm.SaveData ' ** was activecontrol but should be activeform
End Sub

Being tired is the result of too much fun! :~)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now