Solved

Problem with modal forms

Posted on 2000-05-02
2
172 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
2 Comments
 
LVL 2

Accepted Solution

by:
afpcos earned 40 total points
Comment Utility
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
Comment Utility
thanks
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

743 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

12 Experts available now in Live!

Get 1:1 Help Now