Solved

Problem with modal forms

Posted on 2000-05-02
2
188 Views
Last Modified: 2010-05-02
I have 2 forms, frmEdit and frmWait.

(frmEdit is opened modally.)  On frmEdit, when a user clicks on btnSave the program seems to stop when it opens frmWait.  (frmWait is just a form that informs the user to to wait while the progrm is saving)
'--------------------------
Private Sub btnSave_Click()

frmWait.show vbmodal

Call UpdateChanges

unload frmWait
Unload me

End Sub
'--------------------

I know that it has to do something with both forms being displayed modally.  If I changed it so that frmEdit is not opened modally in the beginning then the procedure will run correctly.  Can someone tell me how to make this work with frmEdit being opened modally.

thanks
0
Comment
Question by:sopheak
[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 2

Accepted Solution

by:
afpcos earned 40 total points
ID: 2770090
The problem is because you are loading frmWait modally.  This causes all processes to stop in the parent form until the child form is closed.

Break the saving functions out into other functions besides the sub that loads frmWait.  Create a Public function in frmEdit that will start the 'saving process'.  Load frmWait modally.  On Form Activate of frmWait, call the Public function in frmEdit that will start the save process, then close the frmWait form.

Hope this helps.
0
 

Author Comment

by:sopheak
ID: 2770784
thanks
0

Featured Post

Independent Software Vendors: 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

Title # Comments Views Activity
Run code from text file in vb 1 103
Child Form in front 4 66
Problem to With line 4 87
Remove Exif Orientation before adding image to db 9 63
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

759 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