Solved

Problem displaying a status box during a database query

Posted on 2004-04-30
3
154 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
[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
3 Comments
 
LVL 19

Accepted Solution

by:
Shauli earned 500 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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month11 days, 5 hours left to enroll

631 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