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

Similar Threads

Command Button Not Executing 24
Run apdate query 3
Unable to clear all checkboxes ? 5
SQL Commands 3
I have a problem with opening a form. 11
two query 1
Simplify my code 2
How to make one button to update 3 queries 9

Top