Solved

Toolbar problem

Posted on 1998-08-16
3
262 Views
Last Modified: 2010-04-30
Hi all, I want to enable or disable toolbar buttons which is on the MDI parent form, on the basis of some event which is triggered when a button is pressed on the MDI child form, but when I do this it gives an error "ONLY ONE MDI FORM ALLOWED". How ccan avoid this problem.
Waiting for help...
0
Comment
Question by:Moin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Expert Comment

by:lmorris
ID: 1429161
This sounds like you created an instance of your MDI for by doing something like:

Dim f as MDIForm1
set f = new MDIForm1
f.Show

Then, later one of your MDI Child forms does a MDIForm1.Toolbar1.Buttons(0).Enable (for example).

You have one instance of the MDIForm1 (f), then you try to load another by refering to MDIForm1.

Instead of refering to your MDIForm as MDIForm1, try using parent.

Hope this was the problem or at least helps.
0
 

Author Comment

by:Moin
ID: 1429162
Yes, the problem was similar to this. Now I am using the name of the object, which is derived from the MDIMainFrm, instead of using the MDIForm directly.
Please mark your comment as answer so that I can grade it.
Thanx.
0
 
LVL 2

Accepted Solution

by:
lmorris earned 10 total points
ID: 1429163
Glad I could help!
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 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…

751 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