View Single Post
  #2  
Old April 6th, 2005, 02:14 PM
Arvin Meyer
external usenet poster
 
Posts: n/a
Default

Set the code for your command button like this:

Private Sub cmdWhatever_Click()
CurrentDb.Execute "Delete * From tblMyTable Where ID =" & Me.cboID
Me.Requery
End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

"Sam Kuo" .(donotspam) wrote in message
...
Hi all,

I have created a button in a subform (with continuous form as the default
view).
I'd like to be able to click the button and delete the record. How may I

do
that?

Regards,
Sam