Show message box while qury is still running

Posted on 2009-04-30
Last Modified: 2013-11-28
I have a make table query and I want a message box that says" Update In progress" and then after the make table query is completed I want change the message to "Updates Done"

is this possible in vba or macro?
Question by:tvae
    LVL 15

    Accepted Solution

    Create it as a form.  Before the query runs, open the form with a text box in it that says: "Update In progress".  After the query runs, use vba code to change the text in the text box.

    Something like this:

    DoCmd.Openform "MyMessageForm"

    'run the code here that calls your query

    MyMessageForm.MyTextBox.Value = "Updates Done"

    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    OR ... you can use the SysCmd ( ) function and display this message on the Status Bar:

    Call SysCmd(acSysCmdSetStatus, "Update In progress ..."

    ' run code here

    Call SysCmd(acSysCmdClearStatus)  


    Call SysCmd(acSysCmdSetStatus, "Update Complete."

    LVL 44

    Expert Comment

    If you run the query from a form, wrap the line which starts the query with:

    docmd.hourglass True
    docmd.runSQL queryline
    docmd.hourglass False

    This will turn the cursor into an hourglass as long as the query is processing.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
    Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
    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…

    737 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

    17 Experts available now in Live!

    Get 1:1 Help Now