DoCmd.Echo not working

Posted on 2006-06-01
Last Modified: 2011-09-20
In my access  application, I have a button to call a batch file. Since it will take some time to finish the process, I added DoCmd.Echo True, "Creating Job folders...".But for some reason it is not showing up in the status bar.
Here is the code

DoCmd.Echo True, "Creating Job folders..."
' REM  Application.Echo True, "Creating Job folders..."

Call Shell CreateJob.bat

Can you tell me why
Question by:aio419
    LVL 27

    Accepted Solution

    to write to the status bar use:

    -- To Set The Message -------------
    Call SysCmd(acSysCmdSetStatus, "HI THERE!!")

    -- To Clear The Message -----------
    Call SysCmd(acSysCmdClearStatus)

    LVL 119

    Expert Comment

    by:Rey Obrero

    DoCmd.Echo True, "Creating Job folders..."
    DoEvents      '<<< add this line

    Author Comment

    jjafferr ,that is cool! You are an expert!

    just for my information
    Can you explain why the DoCmd.Echo True, "Creating Job folders..." did not work.
    It is working everywhere else.

    It shows there for a fraction of a second in the taskbar and gone .
    I tried doevents also
    LVL 27

    Expert Comment


    because the code finished executing :o)
    because you used shell, the code will pass the task to the processor, but will not wait for it to finish.

    if however you want the code wait until the shell is finished, then you should use:

    LVL 38

    Expert Comment

    I think it will work if you use the Application object instead of the DoCmd object as follows:

    Private Sub XXXXX()  
    Application.Echo False  
    DoCmd.Hourglass True  
    ...................your code........
    Application.Echo True  
    DoCmd.Hourglass False  
    End Sub

    Author Comment

    Thanks guys for all the info.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
    I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 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

    10 Experts available now in Live!

    Get 1:1 Help Now