It depends on whether you're using DAO or ADO. With DAO, use the dbFailOnError option and the call will generate a run-time error if, for example, the query can't execute because it would cause a key violation.
With ADO, the call will generate a runtime error if not successful, also you can...