bossmack916
New member
- Local time
- Yesterday, 18:39
- Joined
- Mar 28, 2012
- Messages
- 6
I need some assistance in deleting a record from a table using a command button. I am preety new to coding within Access, but can understand code better than I can produce it. Im not familiar with all of the syntax.
With that said, here is what i have so far. I am trying to run a docmd.RunSQL command to do a DELETE statement:
Private Sub Command40_Click()
DoCmd.RunSQL(Delete * FROM Products WHERE txtProductRowID = me.txtProductRowID)
End Sub
Theres is basically a form with product information based on the product ID. I want to delete the product from the "Products" Table because it is no longer a product they carry. So with the press of this button I would like all of the information deleted from the table and form.....
Your assistance is greatly appreciated!
With that said, here is what i have so far. I am trying to run a docmd.RunSQL command to do a DELETE statement:
Private Sub Command40_Click()
DoCmd.RunSQL(Delete * FROM Products WHERE txtProductRowID = me.txtProductRowID)
End Sub
Theres is basically a form with product information based on the product ID. I want to delete the product from the "Products" Table because it is no longer a product they carry. So with the press of this button I would like all of the information deleted from the table and form.....
Your assistance is greatly appreciated!