Delete record in ADP without requery

  • Thread starter Gonzalo Moreno via AccessMonster.com
  • 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.
 
A

Alex White MCDBA MCSE

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top