Open a popup from a modal form in Mousedown event

B

bdtmike

I want to use the mousedown event on a text box to open a popup form
with information on it. When the user releases the mouse button, the
form goes away. Apparently, Access wigs when the calling form is
opened as a dialog

Here's how you recreate it:
1. Create a form (Form1), put a text box on it.
2. Create another form (Form2) with nothing on it.
3. Set the popup property of Form2 to "Yes" and save.
4. Edit the MouseDown event of Form1's text box. Have it Open Form2
normally (docmd.openform "Form2") 5. Edit the MouseUp property of the
text box and have it close form2 (docmd.close acform,"Form2"

Now, Open Form1 as modal from the immediate window using the command:
docmd.OpenForm "form1",,,,,acDialog

Form 1 is now modal. Position your form so that form1 & form2 overlap.
When you hold the mouse down while in the text field, form2 pops up
but form1 still "bleeds through". If Form1 is opened regularly, no
problem.

Any Ideas?
 
M

MacDermott

Works fine for me in Access 2000.
Perhaps you could add
Forms!Form2.Repaint
to your MouseDown event procedure...
 
B

bdtmike

Same problem in Access 2000 as in XP and 2003. Are you sure you opened
form1 as a dialog first?
 
M

MacDermott

Not sure what I was doing different yesterday, but yes, today I see what you
describe.
I've tried a number of approaches, but none have helped...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top