Delete record in ADP without requery

  • Thread starter Thread starter Gonzalo Moreno via AccessMonster.com
  • Start date Start date
G

Gonzalo Moreno via AccessMonster.com

Hi,

I have a form in DataEntry mode and I want to delete one of the recent
created records but without loosing the others that are still "navegable"
because the form isn't closed yet.

If I delete by code I need to issue a Requery, so I loose the other new
records.

BUT!

If I delete the record with the Access toolbar delete button everything
works as expected, the record is deleted and the others stay there
(navegable through the record toolbar).

I've tried with "DoCmd.RunCommand acCmdDeleteRecord" but it requeries the
form so I loose them...

Maybe calling directly to the toolbar button? But I would prefer not to use
such an ugly way.

Any ideas?

Thank you very much.


Gonzalo.
 
Hi,

how about a delete query to delete the record directly e.g.

docmd.runsql("Delete * from TblTest Where Test_ID=" & me.Test_ID.value)

hope it helps.
 
Back
Top