Delete Button

jon2371

Registered User.
Local time
Today, 18:17
Joined
Aug 2, 2012
Messages
20
Hi Experts,

i have a form and i need to create a button in a form to delete a record, do you have a sample form for this.


thanks,
Jon
 
There is a wizard build into design view of your form.

Find the Button icon, click it and draw a button, then the wizard pops up, go through the selections and you should see Close Form, select it, OK, name it etc.. and OK.

Done.
 
There is a wizard build into design view of your form.

Find the Button icon, click it and draw a button, then the wizard pops up, go through the selections and you should see Close Form, select it, OK, name it etc.. and OK.

Done.
he was asking for a button to delete a record, not close the form.

create a button, and in the wizard select the "Record Operations" category, and choose "Delete Record" from the right hand list box.
 
Thanks, i need to warned the user before deleting the record...where do insert the msgbox, or do you sample vba code for delete button.
 
Thanks, i need to warned the user before deleting the record...where do insert the msgbox, or do you sample vba code for delete button.

This is my code for when the user select the Quit Database button

Code:
Private Sub cmd_Quit_Click()
On Error Resume Next
If MsgBox(" Close Current Database?", vbYesNo + vbQuestion, "System Message") = vbYes Then
DoCmd.Quit
Else
Cancel = True
End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom