On Tue, 19 Jul 2005 08:34:56 +0100, Trevor Best <no****@besty.o rg.uk> wrote:
Neil wrote: I need to temporarily remove the recordset from my form while I run some
queries (have locking problems). So I turned Echo off before removing the
recordset to avoid getting #Name? in the bound controls. However, even
though I turned Echo off, I'm still getting #Name? until I reset the
recordset. Here's the code I'm using:
DoCmd.Hourglass True
Application.Ech o False
Me.RecordSource = ""
<run queries here>
<reset recordsource here>
Anything I'm doing wrong here? (I've also tried DoCmd.Echo False, even
though OLH recommends using Application.Ech o.)
Thanks,
Neil
Echo only refers to the status bar text AFAIK.
<snip>
That's true of the DoCmd object but the Echo method of the Application object is
supposed to freeze screen repainting.
Example from Help:
The following example uses the Echo method to prevent the screen from being
repainted while certain operations are underway. While the procedure opens a
form and minimizes it, the user only sees an hourglass icon indicating that
processing is taking place, and the screen isn't repainted. When this task is
completed, the hourglass changes back to a pointer and screen repainting is
turned back on.
Public Sub EchoOff()
' Open the Employees form minimized.
Application.Ech o False
DoCmd.Hourglass True
DoCmd.OpenForm "Employees" , acNormal
DoCmd.Minimize
Application.Ech o True
DoCmd.Hourglass False
End Sub