There is no way to get this information out of Access at runtime. The compiled code contains no information about the source line numbers.
You'll have to devise your own technique in code, setting a class module-level variable as you get from point to point in the logic, and then displaying it somewhere in the class method's (or procedure's) error handler. Rick Sprague