Update/Delete Query

A

Asif

I have a list showing quanity and date and when I click on an item and
press cmd_Cancel a new form pops up frm_Cancel Record. When I click
cmd_Done in the frm_Cancel Record a delete and update query is run and
the value is deleted from the table. However if I have more than one
entry in the listbox and I want to delete only one entry Access
deletes all of the entries in the list!! Any idea why?

The on click event for cmd_Done is ;

Private Sub Command17_Click()

stDocName = "qry_Balance (Update)"
DoCmd.OpenQuery stDocName, acNormal, acEdit

stDocName = "qry_Balance (Delete)"
DoCmd.OpenQuery stDocName, acNormal, acEdit

End Sub

Thanks
 

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