ACC95: Error Using Identity Column with Data Outline Control (167854)
The information in this article applies to:
- Microsoft Access for Windows 95 7.0
This article was previously published under Q167854 Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you use the Data Outline Control 1.1 to view data from a Microsoft SQL
Server database, you receive the following error:
One of the specified RecordSources is invalid.
CAUSE
The RecordSource property for one or more levels of the Data Outline
Control contains an Identity column from the SQL Server table. An Identity
column is similar to an AutoNumber field in Microsoft Access.
RESOLUTION
There are two methods to work around this problem. You can change the
RecordSource property so it does not include the Identity column, or you
can base the RecordSource on a SQL pass-through query.
Method 1: Change the RecordSource
Change the RecordSource property in the Data Outline Control to eliminate
the Identity column; you must change the RecordSource property for any
level in the Data Outline control that contains an Identity column.
For example, if you only need to see the job_desc, min_lvl, and max_lvl
fields from the Jobs table in the Pubs sample database, set the
RecordSource property to:
SELECT job_desc, min_lvl, max_lvl FROM dbo_jobs
Method 2: Use a SQL Pass-Through Query
Change the RecordSource property so it uses a SQL pass-through query. This
allows you to use the Identity column in your Data Outline Control. Be sure
to include all the fields you need for your Data Outline Control level in
the SQL pass-through query.
For more information about creating and using SQL pass-through queries,
search the Help Index for "pass-through queries."
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access 7.0. We
are researching this problem and will post new information here in the
Microsoft Knowledge Base as it becomes available.
Modification Type: | Minor | Last Reviewed: | 1/26/2005 |
---|
Keywords: | kbbug kberrmsg kbinterop KB167854 |
---|
|