If this is your first visit to our forums, welcome!
Dave, Simply use the ERROR command and list your error number as user error via AddUserError.
Regards, Data Access Worldwide Vincent Oorsprong
Forum Rules