Solved

See this old question ... popup menus missing ....100 points

Posted on 2001-06-15
2
136 Views
Last Modified: 2010-05-02
0
Comment
Question by:costello
[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 Comments
 
LVL 39

Accepted Solution

by:
appari earned 10 total points
ID: 6209349
i suppose you are loading this form from another popup menu click in the previous form. if that is the case it wont display the popup menu here. because at a time only one popup menu can be activated and if this form is a modal window it's won't display popup menu here

for example try this.

1. open a new project.
2. add two forms, form1 and form2
3. add following menus to form1.
     a    (Visible = true)
     ....a1
     b    (Visible = false)
     ....b1   (Visible = true)

4. add following code in form1

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then PopupMenu b
End Sub

Private Sub a1_Click()
Form2.Show 1
End Sub

Private Sub b1_Click()
Form2.Show 1
End Sub

5. add following menus to form2.
     a    (Visible = false)
     ....a1

6. add following code to Form2

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then PopupMenu a
End Sub    

7. now run the project. u can observe if you load the form from a1 click u can access popup menu in form2, but if u load form2 from b1 click it wont show form2's popup.

8.  now if u change the following code in form1 from

Private Sub b1_Click()
Form2.Show 1
End Sub

to

Private Sub b1_Click()
Form2.Show
End Sub

and run now u can see popup menu in both the cases whether u are clicking a1 or b1.

i suppose this helps you,

thank you,
Rao

0
 

Author Comment

by:costello
ID: 6267003
Hi Rao,

I see you have put a comment in both this question and the real question, but only after another comment was accepted.

Sorry for that, but for your effort, I'll award you 10 points here and an A.

costello
Community Support Moderator @ Experts-Exchange
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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 …
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…
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…

736 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