The information in this article applies to:
Moderate: Requires basic macro, coding, and interoperability skills. SYMPTOMSWhen you run a procedure that contains the OpenReport method of the DoCmd object, and you use the wherecondition argument to pass a string that contains more than 2000 characters, the report may not open. You may also receive the following error message: Note that the number of characters in the wherecondition argument that causes this behavior may vary. For example, the problem may not occur until the length of the wherecondition argument exceeds 2048 characters. RESOLUTIONYou can use two methods to filter a report without limitation on the size of the WHERE clause. Method 1Instead of using the wherecondition argument, use the filtername argument of the OpenReport method to pass the name of a saved query. This method allows you to filter a report without limitation on the size of the WHERE clause.Method 2Use the Open event to set the RecordSource property of the report to a SQL statement or to a saved query.Note that the number of characters in a cell in the query grid is limited to 1,024. If the SQL statement of the query results in more than 1,000 characters in a cell within the query grid, and if you use the filtername argument to pass the name of that query to the OpenReport method, you may see unexpected behavior. STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. MORE INFORMATIONSteps to Reproduce Problem
REFERENCESFor more information about the OpenReport method, in the Visual Basic Editor, click
Microsoft Visual Basic Help on the Help menu, type "OpenReport method" in
the Office Assistant or the Answer Wizard, and then click Search to
view the topic. Additional query words: pra
Keywords : kberrmsg kbdta MdlProb |
Last Reviewed: May 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |