Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Location
    Canberra, ACT Australia
    Posts
    53

    Unanswered: personalising error messages in access/vb

    I'm running VB script in access from a command button to use docmd.runsql ..., however would like to change the standard error/information messages to more personal/pertinent ones, and then pass command back to an explicit point. Have read the help pages, to no avail.

    In particular I am using SQL to append data from one table to another, to extract only new material. I am extracting from one table where there is duplicate data in one field, into a table where that field is the primary key with no dupes allowed. This then causes a message to the effect 'not all records could be appended do you want to continue etc...'

    Help would be appreciated.

  2. #2
    Join Date
    Feb 2004
    Posts
    142

    Re: personalising error messages in access/vb

    Originally posted by rodmead
    I'm running VB script in access from a command button to use docmd.runsql ..., however would like to change the standard error/information messages to more personal/pertinent ones, and then pass command back to an explicit point. Have read the help pages, to no avail.

    In particular I am using SQL to append data from one table to another, to extract only new material. I am extracting from one table where there is duplicate data in one field, into a table where that field is the primary key with no dupes allowed. This then causes a message to the effect 'not all records could be appended do you want to continue etc...'

    Help would be appreciated.
    If you have a list of the error codes you can trap them in whatever error handlers you are using and display whatever kind of message you want.

    In addition is you know which errors the app is likely to encounter you can test for that condition before executing an SQL or other command and either raise an error or take some kind of preventive action that works in that situation.

    On error resume next will allow you to check for errors after every action to more customize error handling.
    KC

  3. #3
    Join Date
    Jul 2003
    Location
    Canberra, ACT Australia
    Posts
    53

    Wink

    kc
    many thanks, however I am aware of the logic and general nature, but my problem appears to be in the syntax.

    Thanks again, and will keep trying.

Posting Permissions

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