A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

I'd like my delete warning back. I don't know where it went.



 
 
Thread Tools Display Modes
  #1  
Old August 22nd, 2006, 06:39 PM posted to microsoft.public.access.forms
Don
external usenet poster
 
Posts: 40
Default 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  
Old August 22nd, 2006, 07:01 PM posted to microsoft.public.access.forms
Darrell Childress
external usenet poster
 
Posts: 24
Default 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  
Old August 22nd, 2006, 07:18 PM posted to microsoft.public.access.forms
Pat Hartman\(MVP\)
external usenet poster
 
Posts: 124
Default 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  
Old August 22nd, 2006, 08:29 PM posted to microsoft.public.access.forms
Don
external usenet poster
 
Posts: 40
Default 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  
Old August 23rd, 2006, 08:02 AM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default 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  
Old August 23rd, 2006, 12:11 PM posted to microsoft.public.access.forms
Don
external usenet poster
 
Posts: 40
Default 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  
Old August 23rd, 2006, 02:40 PM posted to microsoft.public.access.forms
Joan Wild
external usenet poster
 
Posts: 642
Default 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  
Old August 23rd, 2006, 04:03 PM posted to microsoft.public.access.forms
Don
external usenet poster
 
Posts: 40
Default 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  
Old August 23rd, 2006, 05:35 PM posted to microsoft.public.access.forms
Don
external usenet poster
 
Posts: 40
Default 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  
Old August 23rd, 2006, 10:21 PM posted to microsoft.public.access.forms
Joan Wild
external usenet poster
 
Posts: 642
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.