Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Warning Massage

Discussion in 'Information Technology' started by Tom, Jul 28, 2006.

  1. Tom

    Tom
    Expand Collapse
    Guest

    Hi All,

    Here is what I wrote:

    Dim Msg As String, Style, Title, Response
    Msg = "You are about to delete this record from the list, continue?"
    Style = vbOKCancel
    Title = "Delete Record"
    Response = MsgBox(Msg, Style, Title)
    If Response = vbOK Then
    DoCmd.RunCommand acCmdDeleteRecord
    DoCmd.SetWarnings False
    End If
    and still I get access massage that I`m about to delete a record.

    Thnaks,
    Tom
     
  2. Loading...

    Similar Threads Forum Date
    UK Summer Warnings over Forced Marriages Breaking News Aug 10, 2013
    Canada Warning: your Internet may not work on Monday Breaking News Jul 7, 2012
    World UNHCR in Somalia 'Human Tragedy' Warning Breaking News Jul 6, 2011
    WARNING: Facebook, PayPal logins released by hackers Information Technology Jun 18, 2011
    India Ramdev Threatens Armed Rebellion, Govt Issues Stern Warning Breaking News Jun 8, 2011

  3. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    Tom,

    You've got the SetWarnings in the wrong place. I would do it like this...

    If MsgBox("You are about to delete this record from the list,
    continue?", vbYesNo, "Delete Record") = vbYes Then
    DoCmd.SetWarnings False
    DoCmd.RunCommand acCmdDeleteRecord
    DoCmd.SetWarnings True
    End If

    --
    Steve Schapel, Microsoft Access MVP


    Tom wrote:
    > Hi All,
    >
    > Here is what I wrote:
    >
    > Dim Msg As String, Style, Title, Response
    > Msg = "You are about to delete this record from the list, continue?"
    > Style = vbOKCancel
    > Title = "Delete Record"
    > Response = MsgBox(Msg, Style, Title)
    > If Response = vbOK Then
    > DoCmd.RunCommand acCmdDeleteRecord
    > DoCmd.SetWarnings False
    > End If
    > and still I get access massage that I`m about to delete a record.
    >
    > Thnaks,
    > Tom
    >
    >
    >
    >
     
  4. Tom

    Tom
    Expand Collapse
    Guest

    ooops, Thanks

    "Steve Schapel" <schapel@mvps.org.ns> wrote in message
    news:unRP%23JldGHA.1320@TK2MSFTNGP04.phx.gbl...
    > Tom,
    >
    > You've got the SetWarnings in the wrong place. I would do it like this...
    >
    > If MsgBox("You are about to delete this record from the list, continue?",
    > vbYesNo, "Delete Record") = vbYes Then
    > DoCmd.SetWarnings False
    > DoCmd.RunCommand acCmdDeleteRecord
    > DoCmd.SetWarnings True
    > End If
    >
    > --
    > Steve Schapel, Microsoft Access MVP
    >
    >
    > Tom wrote:
    >> Hi All,
    >>
    >> Here is what I wrote:
    >>
    >> Dim Msg As String, Style, Title, Response
    >> Msg = "You are about to delete this record from the list, continue?"
    >> Style = vbOKCancel
    >> Title = "Delete Record"
    >> Response = MsgBox(Msg, Style, Title)
    >> If Response = vbOK Then
    >> DoCmd.RunCommand acCmdDeleteRecord
    >> DoCmd.SetWarnings False
    >> End If
    >> and still I get access massage that I`m about to delete a record.
    >>
    >> Thnaks,
    >> Tom
    >>
    >>
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page