help with database exceptions

Well hello

I'm trying to write a small application that uses calls such as LOCATE and
POST for find and update records in an Access database. This works (sorta),
but I want to trap any possible database errors and return to the calling
unit the appropriate error number.

How ? I should add that I'm a complete novice ... *sigh*