Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004
    Posts
    133

    Talking Unanswered: error handling in case

    For example I have a form with 2 field: a field and b field.
    Some time I input a duplicate value of primary key then access
    display 3002 error message to inform about the duplicate of primary key.
    I just learned a bout error handling with on error goto something ...
    But in this case, I don't know how to handle about the duplicate of primary key.
    Could anyone teach me in detail how to handle error about duplicate of primary
    key.
    thanks

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi

    The only place I believe you can trap this error is in the Form Error event. You can, however, validate input before committing the data to disk i.e. in the form before update event check the table for the existance of the primary key you are about to commit. If it exists, politley inform your user and and cancel the commit

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •