Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Records 1

Status
Not open for further replies.

luceze

Programmer
Apr 26, 2001
842
US
Is there a way to delete the active record in one form by clicking a button in another form (pop-up).
 
There is the "correct" way, and the "messy/workable" way:

1. Correct: set focus to the other form and run "RunCommand acCmdDeleteRecord", then set the focus back to the popup. This may not work if the popup is opened in dialog mode.

2. Messy:
Code:
-Run SQL "DELETE * FROM tbl WHERE ID = " & forms![thefirstform]![ctlThatHastheIDInfo]
-Requery thefirstform


Looking back, they're both messy. So be it.

--
Find common answers using Google Groups:

Corrupt MDBs FAQ
 
I had to do it the messier way but it works just fine. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top