I am trying to trap some warning messages that occur when I run Append Queries in code, I know I can disable them with docmd.setwarnings = false, but I would like to trap them so I can count the number of times they occur. Basically I am appending records some of which will not successfully append due to key violations which is fine, I just want to count the number of successful appends. I am appending one row at a time with a loop. These warning messages don't seem to have error numbers like regular run time errors so I was wondering if any one knew of a way to trap them. Any help would be appreciated.