ACC2000: Error Message or Empty Field List in an Access Project with a Form or a Report Based on a Stored Procedure (264097)
The information in this article applies to:
This article was previously published under Q264097 Advanced: Requires expert coding, interoperability, and multiuser skills.
This article applies only to a Microsoft Access project (.adp).
SYMPTOMS
In an Access project in which you have the record source of a form or a report set to a stored procedure that selects from a local or a global temporary table, the field list is empty.
You may also receive the following error message when you try to set the RecordSource property of the form or the report, or when you type the control source for a control on the form or the report in the ControlSource property box:
Microsoft Access can't find the object 'Microsoft Access can't find the object 'StoredProcedureName'.'
*You misspelled the object name. Check for missing underscores(_) or other punctuation, and make sure you didn't enter leading spaces.
*You tried to open a linked table, but the file containing the table isn't on the path you specified. Use the Linked Table Manager to update the link and point to the correct path.
However, after you click OK in the error message, Access accepts the control source or the record source.
CAUSE
In cases where Microsoft Access prepares a SQL statement or a stored procedure in order to determine column information for stored procedures that build a dynamic SQL string, SQL Server does not return column metadata on a simple prepare. Output column information can only be determined on an execute.
RESOLUTION
As a workaround, when you use stored procedures that select from temporary tables, make note of the field names available, and when you create the controls in the form or the report, manually set the control source for each. If you see the error message described in the "Symptoms" section of this article, click OK. If you typed the control source or record source correctly, Access will accept it, and the form or the report will run without error.
Modification Type: | Major | Last Reviewed: | 6/25/2004 |
---|
Keywords: | KbClientServer kbprb KB264097 |
---|
|