#Deleted flashes by - can I get rid of it?

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

Guest

I have a form that is gets new data to fill the a temporary data table under
the form each time the user clicks on the "Next Week" button. Each time the
form is requeried after the old data is deleted and the new data fills the
table the words "#Deleted" fill the fields for an instant. The correct data
fills in quickly but the user is a little bothered by the #Deleted flashing
by. Is there a way not have the form refresh in between the delete of the
data and the refreshing of the new data?

Thanks,
Margaret
 
MargaretM said:
I have a form that is gets new data to fill the a temporary data
table under the form each time the user clicks on the "Next Week"
button. Each time the form is requeried after the old data is
deleted and the new data fills the table the words "#Deleted" fill
the fields for an instant. The correct data fills in quickly but the
user is a little bothered by the #Deleted flashing by. Is there a
way not have the form refresh in between the delete of the data and
the refreshing of the new data?

Thanks,
Margaret

I haven't tried these out, but here are a few approaches:

1. Before deleting the current set of records, filter the form so that
it shows no records. Then after loading the new set of records, clear
the filter. For example:

Me.Filter = "False"
Me.FilterOn = True

' ... code to delete and reload goes here ...

Me.FilterOn = False
Me.Filter = ""

2. Temporarily unbind the form by clearing its RecordSource property,
then restore it after reloading the records. For example,

Me.RecordSource = ""

' ... code to delete and reload goes here ...

Me.RecordSource = "SELECT * FROM MyTempTable"

3. Turn Application.Echo off while you reload the table, then turn it on
again. For example,

Application.Echo False

' ... code to delete and reload goes here ...

Application.Echo True

If you use that last approach, be sure to have good error-handling in
place so that no error can occur and leave Echo set to False.
 
Thanks, Dirk. I appreciate the ideas. I like the last one best but I will
try all 3 today.

Margaret
 
Back
Top