S
Supa Hoopsa
I am trying to stop my form from flickering during a
record update. I need to find the original record after
running a stored procedure to update the prices and
consequently running a "form.requery" to reflect the
changes. My code is as follows:
As you can see in the code above in bold, I am using the
application.echo false/true to try and stop the screen
flickering while the update is taking place.
Unfortunately this is not having any effect. What I see
happening on the screen is the original values first
being replaced by #Name?, then the values of the first
record in the recordset and then the correct values after
the update has taken place.
So while the code works and returns the user to the
original record, the flickering of other values I think
will cause a bit of unease.
Can anyone give me any suggestions as to how to stop this
flickering?
record update. I need to find the original record after
running a stored procedure to update the prices and
consequently running a "form.requery" to reflect the
changes. My code is as follows:
Code:
DoCmd.Hourglass True
Application.Echo False
Dim intTrussKeySave As Double
intTrussKeySave = Me.txtTrussKey
sql = "SPPricingTrusses(" & Truss_Tag & "," & Forms
("frmTrusses").JobIndex & ")"
rst1.Open sql, Conn, adOpenForwardOnly,
adLockOptimistic, adCmdStoredProc
If CurrentProject.AllForms("FrmTrusses").IsLoaded =
True Then
Forms("FrmTrusses").Requery
Dim rs As New ADODB.Recordset
rs.ActiveConnection = CurrentProject.Connection
rs.LockType = adLockOptimistic
rs.Open Me.RecordSource
rs.Find "TrussKey = " & intTrussKeySave, ,
adSearchForward, 1
If Not rs.EOF Then
Set Me.Recordset = rs
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
Application.Echo True
DoCmd.Hourglass False
As you can see in the code above in bold, I am using the
application.echo false/true to try and stop the screen
flickering while the update is taking place.
Unfortunately this is not having any effect. What I see
happening on the screen is the original values first
being replaced by #Name?, then the values of the first
record in the recordset and then the correct values after
the update has taken place.
So while the code works and returns the user to the
original record, the flickering of other values I think
will cause a bit of unease.
Can anyone give me any suggestions as to how to stop this
flickering?