Application.Echo or DoCmd.Echo in a Runtime Database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
-----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
 
Back
Top