If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
I'd like my delete warning back. I don't know where it went.
My delete button just deletes the records with no warning. How do I get
it back? The event for my button is: Private Sub DeleteButton_Click() DoCmd.SetWarnings True On Error GoTo Err_DeleteButton_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 Exit_DeleteButton_Click: Exit Sub Err_DeleteButton_Click: MsgBox Err.Description Resume Exit_DeleteButton_Click End Sub |
#2
|
|||
|
|||
I'd like my delete warning back. I don't know where it went.
Most likely, you have inadvertently turned off the confirmation. To get
it back, go to Tools Options Edit/Find tab In the "Confirm" section, make sure "Record changes" is checked. Don wrote: My delete button just deletes the records with no warning. How do I get it back? The event for my button is: Private Sub DeleteButton_Click() DoCmd.SetWarnings True On Error GoTo Err_DeleteButton_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 Exit_DeleteButton_Click: Exit Sub Err_DeleteButton_Click: MsgBox Err.Description Resume Exit_DeleteButton_Click End Sub |
#3
|
|||
|
|||
I'd like my delete warning back. I don't know where it went.
Do you know what menu item 8 was on the edit menu of Access 95? Well,
neither do I. I'm going to guess that it selects the current record and that menu item 6 deletes it. Convert these to the modern equivalents. DoCmd.RunCommand acCmdSelectRecord DoCmd.RunCommand acCmdDeleteRecord To turn your warnings back on, go to Tools/Options - Edit/Find - Check all the confirm options. "Don" wrote in message oups.com... My delete button just deletes the records with no warning. How do I get it back? The event for my button is: Private Sub DeleteButton_Click() DoCmd.SetWarnings True On Error GoTo Err_DeleteButton_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 Exit_DeleteButton_Click: Exit Sub Err_DeleteButton_Click: MsgBox Err.Description Resume Exit_DeleteButton_Click End Sub |
#4
|
|||
|
|||
I'd like my delete warning back. I don't know where it went.
Thanks for the reply. I made the changes to my event. However, all
confirm options are still checked. Still no warning. I copied the code for a delete button in another database and pasted into this database. Still no warning. I tried creating a new delete button. Still no warning. I just don't get it. Pat Hartman(MVP) wrote: Do you know what menu item 8 was on the edit menu of Access 95? Well, neither do I. I'm going to guess that it selects the current record and that menu item 6 deletes it. Convert these to the modern equivalents. DoCmd.RunCommand acCmdSelectRecord DoCmd.RunCommand acCmdDeleteRecord To turn your warnings back on, go to Tools/Options - Edit/Find - Check all the confirm options. "Don" wrote in message oups.com... My delete button just deletes the records with no warning. How do I get it back? The event for my button is: Private Sub DeleteButton_Click() DoCmd.SetWarnings True On Error GoTo Err_DeleteButton_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 Exit_DeleteButton_Click: Exit Sub Err_DeleteButton_Click: MsgBox Err.Description Resume Exit_DeleteButton_Click End Sub |
#5
|
|||
|
|||
I'd like my delete warning back. I don't know where it went.
3 places to look: - SetWarnings is still off. (Most common.) - You have code in the form's BeforeDelConfirm event that suppresses the warning mesage. - The confirm options you have already been pointed to. Here's a way to delete a record without any confirmation message, regardless of any of those settings: Private Sub DeleteButton_Click() If Me.Dirty Then Me.Undo End If If Not Me.NewRecord Then With Me.RecordsetClone .Bookmark = Me.Bookmark .Delete End With End If End Sub -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Don" wrote in message ps.com... Thanks for the reply. I made the changes to my event. However, all confirm options are still checked. Still no warning. I copied the code for a delete button in another database and pasted into this database. Still no warning. I tried creating a new delete button. Still no warning. I just don't get it. Pat Hartman(MVP) wrote: Do you know what menu item 8 was on the edit menu of Access 95? Well, neither do I. I'm going to guess that it selects the current record and that menu item 6 deletes it. Convert these to the modern equivalents. DoCmd.RunCommand acCmdSelectRecord DoCmd.RunCommand acCmdDeleteRecord To turn your warnings back on, go to Tools/Options - Edit/Find - Check all the confirm options. "Don" wrote in message oups.com... My delete button just deletes the records with no warning. How do I get it back? The event for my button is: Private Sub DeleteButton_Click() DoCmd.SetWarnings True On Error GoTo Err_DeleteButton_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 Exit_DeleteButton_Click: Exit Sub Err_DeleteButton_Click: MsgBox Err.Description Resume Exit_DeleteButton_Click End Sub |
#6
|
|||
|
|||
I'd like my delete warning back. I don't know where it went.
Thank you for your reply. I just noticed that I don't get a delete
warning even when I'm deleting the record from the Edit menu. I've checked my confirm options and they are still checked. Allen Browne wrote: 3 places to look: - SetWarnings is still off. (Most common.) - You have code in the form's BeforeDelConfirm event that suppresses the warning mesage. - The confirm options you have already been pointed to. Here's a way to delete a record without any confirmation message, regardless of any of those settings: Private Sub DeleteButton_Click() If Me.Dirty Then Me.Undo End If If Not Me.NewRecord Then With Me.RecordsetClone .Bookmark = Me.Bookmark .Delete End With End If End Sub -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Don" wrote in message ps.com... Thanks for the reply. I made the changes to my event. However, all confirm options are still checked. Still no warning. I copied the code for a delete button in another database and pasted into this database. Still no warning. I tried creating a new delete button. Still no warning. I just don't get it. Pat Hartman(MVP) wrote: Do you know what menu item 8 was on the edit menu of Access 95? Well, neither do I. I'm going to guess that it selects the current record and that menu item 6 deletes it. Convert these to the modern equivalents. DoCmd.RunCommand acCmdSelectRecord DoCmd.RunCommand acCmdDeleteRecord To turn your warnings back on, go to Tools/Options - Edit/Find - Check all the confirm options. "Don" wrote in message oups.com... My delete button just deletes the records with no warning. How do I get it back? The event for my button is: Private Sub DeleteButton_Click() DoCmd.SetWarnings True On Error GoTo Err_DeleteButton_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 Exit_DeleteButton_Click: Exit Sub Err_DeleteButton_Click: MsgBox Err.Description Resume Exit_DeleteButton_Click End Sub |
#7
|
|||
|
|||
I'd like my delete warning back. I don't know where it went.
Then Allen's first suggestion is likely.
Hit Ctrl-G and type DoCmd.SetWarnings True -- Joan Wild Microsoft Access MVP Don wrote: Thank you for your reply. I just noticed that I don't get a delete warning even when I'm deleting the record from the Edit menu. I've checked my confirm options and they are still checked. Allen Browne wrote: 3 places to look: - SetWarnings is still off. (Most common.) - You have code in the form's BeforeDelConfirm event that suppresses the warning mesage. - The confirm options you have already been pointed to. Here's a way to delete a record without any confirmation message, regardless of any of those settings: Private Sub DeleteButton_Click() If Me.Dirty Then Me.Undo End If If Not Me.NewRecord Then With Me.RecordsetClone .Bookmark = Me.Bookmark .Delete End With End If End Sub -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Don" wrote in message ps.com... Thanks for the reply. I made the changes to my event. However, all confirm options are still checked. Still no warning. I copied the code for a delete button in another database and pasted into this database. Still no warning. I tried creating a new delete button. Still no warning. I just don't get it. Pat Hartman(MVP) wrote: Do you know what menu item 8 was on the edit menu of Access 95? Well, neither do I. I'm going to guess that it selects the current record and that menu item 6 deletes it. Convert these to the modern equivalents. DoCmd.RunCommand acCmdSelectRecord DoCmd.RunCommand acCmdDeleteRecord To turn your warnings back on, go to Tools/Options - Edit/Find - Check all the confirm options. "Don" wrote in message oups.com... My delete button just deletes the records with no warning. How do I get it back? The event for my button is: Private Sub DeleteButton_Click() DoCmd.SetWarnings True On Error GoTo Err_DeleteButton_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 Exit_DeleteButton_Click: Exit Sub Err_DeleteButton_Click: MsgBox Err.Description Resume Exit_DeleteButton_Click End Sub |
#8
|
|||
|
|||
I'd like my delete warning back. I don't know where it went.
Thanks for the reply. Unfortunately, I had no luck. It's weird because
my other tables and forms offer a confirmation message on delete but not this form. So, I'm thinking it has to be in the code. But, prior to this thread I hadn't used DoCmd.SetWarnings at all or played with the confirmation checkboxes. Can anybody help me make a customized MsgBox that popups on delete? Perhaps that's my only way out. Joan Wild wrote: Then Allen's first suggestion is likely. Hit Ctrl-G and type DoCmd.SetWarnings True -- Joan Wild Microsoft Access MVP Don wrote: Thank you for your reply. I just noticed that I don't get a delete warning even when I'm deleting the record from the Edit menu. I've checked my confirm options and they are still checked. Allen Browne wrote: 3 places to look: - SetWarnings is still off. (Most common.) - You have code in the form's BeforeDelConfirm event that suppresses the warning mesage. - The confirm options you have already been pointed to. Here's a way to delete a record without any confirmation message, regardless of any of those settings: Private Sub DeleteButton_Click() If Me.Dirty Then Me.Undo End If If Not Me.NewRecord Then With Me.RecordsetClone .Bookmark = Me.Bookmark .Delete End With End If End Sub -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Don" wrote in message ps.com... Thanks for the reply. I made the changes to my event. However, all confirm options are still checked. Still no warning. I copied the code for a delete button in another database and pasted into this database. Still no warning. I tried creating a new delete button. Still no warning. I just don't get it. Pat Hartman(MVP) wrote: Do you know what menu item 8 was on the edit menu of Access 95? Well, neither do I. I'm going to guess that it selects the current record and that menu item 6 deletes it. Convert these to the modern equivalents. DoCmd.RunCommand acCmdSelectRecord DoCmd.RunCommand acCmdDeleteRecord To turn your warnings back on, go to Tools/Options - Edit/Find - Check all the confirm options. "Don" wrote in message oups.com... My delete button just deletes the records with no warning. How do I get it back? The event for my button is: Private Sub DeleteButton_Click() DoCmd.SetWarnings True On Error GoTo Err_DeleteButton_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 Exit_DeleteButton_Click: Exit Sub Err_DeleteButton_Click: MsgBox Err.Description Resume Exit_DeleteButton_Click End Sub |
#9
|
|||
|
|||
I'd like my delete warning back. I don't know where it went.
Could the fact that this form is my only form with a subform make a
difference. I saw in another post that if a form is set to be a popup and modal then the delete confirmation will not fire. So, I made sure that neither form was set to popup or modal. Are there any other property settings that might cause this? Joan Wild wrote: Then Allen's first suggestion is likely. Hit Ctrl-G and type DoCmd.SetWarnings True -- Joan Wild Microsoft Access MVP Don wrote: Thank you for your reply. I just noticed that I don't get a delete warning even when I'm deleting the record from the Edit menu. I've checked my confirm options and they are still checked. Allen Browne wrote: 3 places to look: - SetWarnings is still off. (Most common.) - You have code in the form's BeforeDelConfirm event that suppresses the warning mesage. - The confirm options you have already been pointed to. Here's a way to delete a record without any confirmation message, regardless of any of those settings: Private Sub DeleteButton_Click() If Me.Dirty Then Me.Undo End If If Not Me.NewRecord Then With Me.RecordsetClone .Bookmark = Me.Bookmark .Delete End With End If End Sub -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Don" wrote in message ps.com... Thanks for the reply. I made the changes to my event. However, all confirm options are still checked. Still no warning. I copied the code for a delete button in another database and pasted into this database. Still no warning. I tried creating a new delete button. Still no warning. I just don't get it. Pat Hartman(MVP) wrote: Do you know what menu item 8 was on the edit menu of Access 95? Well, neither do I. I'm going to guess that it selects the current record and that menu item 6 deletes it. Convert these to the modern equivalents. DoCmd.RunCommand acCmdSelectRecord DoCmd.RunCommand acCmdDeleteRecord To turn your warnings back on, go to Tools/Options - Edit/Find - Check all the confirm options. "Don" wrote in message oups.com... My delete button just deletes the records with no warning. How do I get it back? The event for my button is: Private Sub DeleteButton_Click() DoCmd.SetWarnings True On Error GoTo Err_DeleteButton_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 Exit_DeleteButton_Click: Exit Sub Err_DeleteButton_Click: MsgBox Err.Description Resume Exit_DeleteButton_Click End Sub |
#10
|
|||
|
|||
I'd like my delete warning back. I don't know where it went.
I cannot think of any. Double check the code on this form. Is this form
opened from another form - if so check its code. -- Joan Wild Microsoft Access MVP Don wrote: Could the fact that this form is my only form with a subform make a difference. I saw in another post that if a form is set to be a popup and modal then the delete confirmation will not fire. So, I made sure that neither form was set to popup or modal. Are there any other property settings that might cause this? Joan Wild wrote: Then Allen's first suggestion is likely. Hit Ctrl-G and type DoCmd.SetWarnings True -- Joan Wild Microsoft Access MVP Don wrote: Thank you for your reply. I just noticed that I don't get a delete warning even when I'm deleting the record from the Edit menu. I've checked my confirm options and they are still checked. Allen Browne wrote: 3 places to look: - SetWarnings is still off. (Most common.) - You have code in the form's BeforeDelConfirm event that suppresses the warning mesage. - The confirm options you have already been pointed to. Here's a way to delete a record without any confirmation message, regardless of any of those settings: Private Sub DeleteButton_Click() If Me.Dirty Then Me.Undo End If If Not Me.NewRecord Then With Me.RecordsetClone .Bookmark = Me.Bookmark .Delete End With End If End Sub -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Don" wrote in message ps.com... Thanks for the reply. I made the changes to my event. However, all confirm options are still checked. Still no warning. I copied the code for a delete button in another database and pasted into this database. Still no warning. I tried creating a new delete button. Still no warning. I just don't get it. Pat Hartman(MVP) wrote: Do you know what menu item 8 was on the edit menu of Access 95? Well, neither do I. I'm going to guess that it selects the current record and that menu item 6 deletes it. Convert these to the modern equivalents. DoCmd.RunCommand acCmdSelectRecord DoCmd.RunCommand acCmdDeleteRecord To turn your warnings back on, go to Tools/Options - Edit/Find - Check all the confirm options. "Don" wrote in message oups.com... My delete button just deletes the records with no warning. How do I get it back? The event for my button is: Private Sub DeleteButton_Click() DoCmd.SetWarnings True On Error GoTo Err_DeleteButton_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 Exit_DeleteButton_Click: Exit Sub Err_DeleteButton_Click: MsgBox Err.Description Resume Exit_DeleteButton_Click End Sub |
|
Thread Tools | |
Display Modes | |
|
|