How do I assign a delete query onto a command button?
I have read a few forums and it has told me to:
My Delete query name is deletedatafromj ob
I have followed all instructions but this doesn't work. I click on the command button and nothing happens.
Have I done something wrong here?
I have read a few forums and it has told me to:
- Go to Properties
- Rename the Name and Caption, so i've renamed it to Runquery
- Under Event - On click I have also changed it to [Event Procedure] and paste:
Code:Private Sub deletedatafromjob_Click() DoCmd.OpenQuery "deletedatafromjob" MsgBox "Code run" End Sub
- Then in the Build Event option, I have put in:
Code:Private Sub deletedatafromjob_Click() DoCmd.OpenQuery "deletedatafromjob" MsgBox "Code run" End Sub
My Delete query name is deletedatafromj ob
I have followed all instructions but this doesn't work. I click on the command button and nothing happens.
Have I done something wrong here?
Comment