Deleted data still showing on form

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

Guest

Hi everyone,
I have a form that is an main form this is unbound. It contains 3 subforms.
I have button on the main form that triggers a procedure to process data and
then assigns a recordsource to each of the 3 subforms. That all works fine.

When the form is closed, I run a delete query to delete the data used to
populate the 3 subform. However, when I open the main form the next time,
the old data on the subforms is there even though it was deleted! I've tried
deleting the data when the form is opened, both that the main and subform
level. Nothing seems to work. Does anyone know why this is happening?
Thanks,
Debbie
 
hi Debbie,
When the form is closed, I run a delete query to delete the data used to
populate the 3 subform. However, when I open the main form the next time,
the old data on the subforms is there even though it was deleted!
Take a look at the base tables, is the data really deleted?

Use CurrentDb.Execute "DELETE * FROM", dbFailOnError to delete your data.


mfG
--> stefan <--
 
Stefan
I have written the procedure using ADO and I did the equivalent of the DAO
form using ADO commands. Do you think there is a difference? Can you use
ADO and DAO in the same module?
 
hi Debbie,
I have written the procedure using ADO and I did the equivalent of the DAO
form using ADO commands. Do you think there is a difference?
Not really. It is a different technology for data access, but that
doesn't matter.
Can you use
ADO and DAO in the same module?
You can, but i think there are some synchronization problems.

Try DAO.Recordset.Requery and ADODB.Recordset.Requery to sync your data.


mfG
--> stefan <--
 
Stefan,
Thank you - I did try it and had the same problem. I ended up opening the
main form in hidden view, closing it and reopening. It's very quirky but it
seems to be the only thing that works. Thanks for your ideas.
Debbie
 
Back
Top