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
  #11  
Old August 24th, 2006, 06:14 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.

Does anyone have the time to check this out if I emailed a copy of my
database? It's really bugging me.

Don

Joan Wild wrote:
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


  #12  
Old August 24th, 2006, 08:05 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.

Sure; zip it and send it to me. Remove the 'nospam' from the email address.

--
Joan Wild
Microsoft Access MVP

Don wrote:
Does anyone have the time to check this out if I emailed a copy of my
database? It's really bugging me.

Don

Joan Wild wrote:
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



  #13  
Old August 25th, 2006, 06:42 AM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 264
Default I'd like my delete warning back. I don't know where it went.

Did you try running

docmd.setwarnings TRUE

somewhere? Does that fix it?

(Allen's solution #1)

  #14  
Old August 25th, 2006, 01:33 PM posted to microsoft.public.access.forms
Gina Whipp
external usenet poster
 
Posts: 3,500
Default I'd like my delete warning back. I don't know where it went.

Does the MainForm of the SubForm allow deletions?


"Don" wrote in message
ups.com...
Does anyone have the time to check this out if I emailed a copy of my
database? It's really bugging me.

Don

Joan Wild wrote:
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




  #15  
Old August 28th, 2006, 06:49 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.

I know it's been a few days. Is your offer still good? If so, can I get
your email address?

Joan Wild wrote:
Sure; zip it and send it to me. Remove the 'nospam' from the email address.

--
Joan Wild
Microsoft Access MVP

Don wrote:
Does anyone have the time to check this out if I emailed a copy of my
database? It's really bugging me.

Don

Joan Wild wrote:
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


  #16  
Old August 28th, 2006, 10:07 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.

The offer is still good, yes. My address is jwild at tyenet dot com

--
Joan Wild
Microsoft Access MVP

Don wrote:
I know it's been a few days. Is your offer still good? If so, can I
get your email address?

Joan Wild wrote:
Sure; zip it and send it to me. Remove the 'nospam' from the email
address.

--
Joan Wild
Microsoft Access MVP

Don wrote:
Does anyone have the time to check this out if I emailed a copy of
my database? It's really bugging me.

Don

Joan Wild wrote:
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 02:59 AM.


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