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

Stopping Access Error messages

Discussion in 'Information Technology' started by Keith, Nov 17, 2005.

  1. Keith

    Keith
    Expand Collapse
    Guest

    I have a form that required four fields combined to be unique. If a
    user inputs an entry that will create a duplicate entry then Access
    brings up an error message saying that the record would produce a
    duplicate entry.

    I put in my own error message in the on error section of the form. This
    works fine but when you ok on my message box Access's message come up
    after it.

    How can I stop Access's message from appearing? I tried setting
    warnings to false but it didn't make any difference.
     
  2. Loading...


  3. Arvin Meyer [MVP]

    Arvin Meyer [MVP]
    Expand Collapse
    Guest

    As long as you use the database engine to limit duplicates, it will produce
    those messages. You could use your own logic in a form's Before Update
    event. That will not protect the data from direct entry.
    --
    Arvin Meyer, MCP, MVP
    Microsoft Access
    Free Access downloads
    http://www.datastrat.com
    http://www.mvps.org/access

    "Keith" <keith@dolby-ltd.co.uk> wrote in message
    news:dlf1ev$b90$1@news0.ifb.net...
    > I have a form that required four fields combined to be unique. If a
    > user inputs an entry that will create a duplicate entry then Access
    > brings up an error message saying that the record would produce a
    > duplicate entry.
    >
    > I put in my own error message in the on error section of the form. This
    > works fine but when you ok on my message box Access's message come up
    > after it.
    >
    > How can I stop Access's message from appearing? I tried setting
    > warnings to false but it didn't make any difference.
     
  4. Jon Lewis

    Jon Lewis
    Expand Collapse
    Guest

    response = acDataErrContinue

    in the Form's On Error event should get rid of the Access message.

    HTH.
    "Keith" <keith@dolby-ltd.co.uk> wrote in message
    news:dlf1ev$b90$1@news0.ifb.net...
    > I have a form that required four fields combined to be unique. If a
    > user inputs an entry that will create a duplicate entry then Access
    > brings up an error message saying that the record would produce a
    > duplicate entry.
    >
    > I put in my own error message in the on error section of the form. This
    > works fine but when you ok on my message box Access's message come up
    > after it.
    >
    > How can I stop Access's message from appearing? I tried setting
    > warnings to false but it didn't make any difference.
     
  5. Arvin Meyer [MVP]

    Arvin Meyer [MVP]
    Expand Collapse
    Guest

    Unfortunately, the Error event will not prevent the error message which
    comes from the table and the Jet engine.
    --
    Arvin Meyer, MCP, MVP
    Microsoft Access
    Free Access downloads
    http://www.datastrat.com
    http://www.mvps.org/access

    "Jon Lewis" <jon.lewis@nospambtinternet.com> wrote in message
    news:#14V7Hr6FHA.2888@tk2msftngp13.phx.gbl...
    > response = acDataErrContinue
    >
    > in the Form's On Error event should get rid of the Access message.
    >
    > HTH.
    > "Keith" <keith@dolby-ltd.co.uk> wrote in message
    > news:dlf1ev$b90$1@news0.ifb.net...
    > > I have a form that required four fields combined to be unique. If a
    > > user inputs an entry that will create a duplicate entry then Access
    > > brings up an error message saying that the record would produce a
    > > duplicate entry.
    > >
    > > I put in my own error message in the on error section of the form. This
    > > works fine but when you ok on my message box Access's message come up
    > > after it.
    > >
    > > How can I stop Access's message from appearing? I tried setting
    > > warnings to false but it didn't make any difference.

    >
    >
     
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