Solved

Problem with modal forms

Posted on 2000-05-02
2
190 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

623 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