Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Problem displaying a status box during a database query

Posted on 2004-04-30
3
Medium Priority
?
157 Views
Last Modified: 2012-05-04
I have an application that pulls data from a large Oracle database. I have a form with various fields the user can enter and a Search button. I would like to display a message telling the user that the program is searching. I have created a form called frmSearchMsg that basically says to please wait. I load frmSearchMsg when the search button is clicked and unload it after the query is finished. The problem is that frmSearchMsg never seems to load complexly. I get the outline and title bar, but the body of the form never loads, i just see what is behind the form. I have tried using the .setfocus and have even put in an empty loop to slow the program down and give it the form time to load, but nothing helps. frmSearchMsg looks fine when I call it by its self. Any Ideas?
0
Comment
Question by:m9s999
3 Comments
 
LVL 19

Accepted Solution

by:
Shauli earned 2000 total points
ID: 10963746
Add Doevents where you load the form, as in:

Doevents
frmSearchMsg.Show

S
0
 
LVL 6

Expert Comment

by:prasitlee
ID: 10964175
Hi m9s999,
    You have a lot of ways to use DoEvents to refresh the menu frmSearchMsg.
    - If you have executed your query program by looping
      Do ......
            ....................
            DoEvents
            ....................
      Loop
      You have to insert DoEvents inside the loop.
   - But if the executed command is just a line of code but it took a long time to query, you have to put Timer Control into your form and set the refresh time on it
     Private Sub Time1_Time()
          ....................
          DoEvents
          ....................
     End Sub
     Hopefully it would be helpful.
                                                     Meng
0
 

Author Comment

by:m9s999
ID: 10968626
Calling DoEvents after I show frmSearchMsg seems to fix the problem. Thanks.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

783 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