Application.Echo or DoCmd.Echo in a Runtime Database

R

rbm

I am having trouble with a runtime database that I developed. Quite often the database crashes (stops or closes) giving me the impression that it is ties to an Application.Echo False / True code. Is Application.Echo or DoCmd.Echo better to use with Access 97 and in a runtime environment?

Thanks for your help.
 
J

Jonathan Parminter

-----Original Message-----
I am having trouble with a runtime database that I
developed. Quite often the database crashes (stops or
closes) giving me the impression that it is ties to an
Application.Echo False / True code. Is Application.Echo
or DoCmd.Echo better to use with Access 97 and in a
runtime environment?
Thanks for your help.
.
Hi rbm, when using either .echo you must switch back on.
That is each docmd.echo EchoOn:=false must later be
followed with a docmd.echo EchoOn:=true. To acoid a blank
screen have the echoon:=true as part of error handling so
that should an error arise the screen view will still
update.

for example

private sub DoIt()
on error goto error_handler
docmd.echo echoon:=false

' do it

DoIt_Exit:
on error goto 0
docmd.echoOn:=true
' any other cleanup code
exit sub

Error_Handler:
msgbox "Error: " Err.description,,"DoIt"
' ensure process exit code
Resume DoIt_Exit

End Sub

Luck
Jonathan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top