Solved

Supremely Annoying...

Posted on 2006-07-05
4
172 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 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17041388
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
ID: 17041565
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
ID: 17041617
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
ID: 17049061
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

740 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