Displaying an Error dialog box when #Error results

  • Thread starter Thread starter George Lob
  • Start date Start date
G

George Lob

I would like to display an Error dialog box if a function inside a query has
a #Error as a result. I would like to have information from that row printed
in the dialog box. Can this be done?
 
Hi George,

Thanks for your post. According to your description, I am not quite clear
what your concern is. Do you mean that you want to pop-up a dialog box when
a function inside a query has a #Error as a result? In the datasheet view
of a form, we can pop-up a dialog box by checking the value of a control.
However, I still think your requirements are strange. When the #Error value
occurred in the recordset from a query, it indicates there is something
wrong in the query so that we can check and fix it. I am not sure why you
want to pop-up a dialog box. Can you please let me know your root concerns?

Thanks for posting in community.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
The reason I want to pop-up a dialog box is to show the info of the line
that has the error. This is more for a report that a form. If a report is
based on a query, if there is an error in one of the query fields the report
just gives you an error box that the query is too complex.

I would like to be able to show info on the row in the query that caused the
error.
 
Hi George,

Thanks for your feedback. Do you mean that you want a pop-up dialog box to
show the info of the line which induced the #ERROR in the underlying query?
If so, unfortunately, I am afraid that Access is unable to meet your
requirements. Based on my experience, if a control in a form or a report
cannot get the recordset correctly from the underlying query, the #ERROR
may display in the control. Generally, the control displaying #ERROR will
be bound to a field in the underlying query, you can then check the related
data source scan the info regarding the problematic field to look for the
problem in the problematic query.

Thanks for posting in community.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top