ACC2000: Error Message "The Data Was Added to the Database But the Data Won't Be Displayed..." When You Add Records to a Subform (287627)
The information in this article applies to:
This article was previously published under Q287627 This article applies only to a Microsoft Access project (.adp).
Advanced: Requires expert coding, interoperability, and multiuser skills.
SYMPTOMS
When you add new records to a subform, you receive the following error message, but the records is still added to the underlying table:
The data was added to the database but the data won't be displayed in the form because it doesn't satisfy the criteria in the underlying record source.
CAUSE
You receive this error message if all of the following conditions are true. - You are using an Access project (ADP) with Microsoft SQL Server 7.0 as the back-end database
- The subform's RecordSource property is a simple SELECT statement such as:
- The table has an Identity field as Primary Key to act as an AutoNumber.
- You are adding new records to the subform.
RESOLUTION
Create a view by using Access, the OSQL Utility, or Enterprise Manager. Then change the form's record source to use the view instead of the SELECT statement. For an example of how to do this in Access, follow these
steps:
- Open the sample project NorthwindCS.adp.
- Press CRTL+G to open the Immediate window.
- Type the following statement in the Immediate window to create the view:
CurrentProject.Connection.Execute "CREATE VIEW vwProductsView AS SELECT ProductID, ProductName, UnitPrice FROM Products WITH CHECK OPTION", False,False
- Change the form's RecordSource property to vwProductsView.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. REFERENCESFor additional information about a similar error message, click the article number below
to view the article in the Microsoft Knowledge Base:
213844 ACC2000: WITH CHECK OPTION Clause Is Not Enforced Within a View
Modification Type: | Minor | Last Reviewed: | 7/14/2004 |
---|
Keywords: | kbbug KbClientServer kberrmsg kbpending KB287627 |
---|
|