Welcome to SPN

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

Sign Up Now!

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.

    >
    >
     

Share This Page