D DAPOOLE Registered User. Local time Today, 18:10 Joined Jan 14, 2010 Messages 38 Jan 27, 2010 #1 How can I code a user prompt box to display when a command button is pressed? Basically I want the user to confirm that they want to delete a record when they press the delete record command button. Thanks in advance.
How can I code a user prompt box to display when a command button is pressed? Basically I want the user to confirm that they want to delete a record when they press the delete record command button. Thanks in advance.
DCrake Remembered Local time Today, 18:10 Joined Jun 8, 2005 Messages 8,620 Jan 27, 2010 #2 On the OnClick event of the command button Code: If MsgBox("Are you sure you want to delete this record?",vbQuestion+vbYesNo,"Confirmation") = vbYes Then 'delete the records Else Exit Sub End If David
On the OnClick event of the command button Code: If MsgBox("Are you sure you want to delete this record?",vbQuestion+vbYesNo,"Confirmation") = vbYes Then 'delete the records Else Exit Sub End If David
S sindu Banned Local time Today, 10:10 Joined Jan 28, 2010 Messages 1 Jan 28, 2010 #3 <html> <head> <script type="text/javascript"> function disp_prompt(){ var name=prompt("Name","") if (name!=null && name!=""){ document.write(name) } } </script> </head> <body> <form> <input type="button" onclick="disp_prompt()" value="Display a prompt box"> </form> </body> </html>
<html> <head> <script type="text/javascript"> function disp_prompt(){ var name=prompt("Name","") if (name!=null && name!=""){ document.write(name) } } </script> </head> <body> <form> <input type="button" onclick="disp_prompt()" value="Display a prompt box"> </form> </body> </html>