ACC2000: "#Error" Message Using TRIM() Function in Form/ReportID: Q202025
|
Moderate: Requires basic macro, coding, and interoperability skills.
If a report or a form has its RecordSource property defined as a table that contains no records, "#Error" is displayed when you preview the report or view the form in Form view if a bound control on the report or form is defined by using the Trim() function.
When you use an expression to define the ControlSource property for a form or report, Microsoft Access evaluates the expression and presents the result for the control. If Access evaluates a blank field, it displays "#Error."
To avoid this error, surround the RecordSource property with an IIF (Immediate If) statement.
=Trim([Field1])
For more information about errors in calculated controls, please see the following article in the Microsoft Knowledge Base:
Q199355 ACC2000: Valid Sum() Function Returns #Error? in Calculated CTRLFor more information about the Trim() Function, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type "trim function" in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Additional query words: pounderror prb
Keywords : kberrmsg kbusage kbdta
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: May 13, 1999