Solved

Supremely Annoying...

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

839 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