Solved

Supremely Annoying...

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA color chart bars 12 78
how can i unlock a picture file that was loaded in a picturebox in visual c#? 4 87
Adding to a VBA? 6 62
Macro Excel - Multiple If conditions 2 65
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…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

895 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

17 Experts available now in Live!

Get 1:1 Help Now