Change Message

melinda

Registered User.
Local time
Today, 23:44
Joined
Feb 19, 2003
Messages
31
i made an access form.
in that form i put Delete button, here is code in that button :

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

when i click that button, this message appear :

You are about to delete 1 record(s).
if You click yes, u wont be able to undo this .......

I want to change this message with another message.
is it posible to do that ?

Any one could help me ? i will apreciate that.

best reagrds
melinda
 
melinda,

try this:

Dim RESPONSE, MSG, STYLE, TITLE As String
MSG = "DO YOU WANT TO DELETE THIS ITEM ?"
STYLE = vbOKCancel
TITLE = "DELETE ?"

DoCmd.Beep

RESPONSE = MsgBox(MSG, STYLE, TITLE)

If RESPONSE = vbOK Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

If RESPONSE = vbCancel Then
Exit Sub

End If

End If

let me know how you get on.

IMO
 
I aready did that, but same message still appear when i click Yes.

what should i do now ?
 
As far as I know this part of the code is obsolete:

Code:
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Use this instead.

Code:
DoCmd.SetWarnings False

If MsgBox("Do you wish to delete this record?", vbQuestion + vbYesNo, "Delete Record?") = vbYes Then
   DoCmd.RunCommand acCmdDeleteRecord
End If

DoCmd.SetWarnings True
 
melinda,

go to tools >> options >> Edit/find and uncheck Confirm Record changes,Document deletions and Action Queries.

IMO
 
Thanks so much..... Mile O Phile and IMO....
my problem solved...

best regards
melinda
 

Users who are viewing this thread

Back
Top Bottom