You cannot update the data in a view that you created in Office Access 2003 (905476)
The information in this article applies to:
- Microsoft Office Access 2003
This
article applies only to a Microsoft Access project (.adp).
SYMPTOMSWhen you open a view that you created in Microsoft Office Access 2003, the data in the view is read-only. Therefore, you cannot update the data.CAUSEThis issue occurs if the following conditions are true:
- The Update using view rules option is selected in the properties for the view.
- The view contains a JOIN statement or a subquery.
Note The JOIN statement can be an INNER JOIN or OUTER JOIN
statement.
WORKAROUNDTo work around this issue, follow these steps. Note These steps work around the example issue that occurs when you follow the steps in the "Steps to reproduce the issue" section. To follow these steps, first follow the steps in the "Steps to reproduce the issue" section. Then follow these steps to resolve this example issue. - In the database window, click New, click
Create Text Scalar Function, and then click
OK.
- In the Function pane, paste the following
function:
CREATE FUNCTION dbo.LookupUser
(@ID int)
RETURNS varchar(50)
AS
BEGIN
DECLARE @usr varchar(50)
SELECT @usr=UserID FROM dbo.Security Where ID=@ID and UserID=CURRENT_USER
RETURN @usr
END - Click File, click Save,
type LookupUser if you have to, and then click
Save.
- On the File menu, click
Close.
- In the database window, click the view that you saved in step 11
of the "Steps to reproduce the issue" section, and then click
Design.
- In the SQL pane, replace the existing SQL statement with
the following statement:
SELECT OrderID, CustomerID, EmployeeID, OrderDate
FROM dbo.Orders
WHERE (dbo.LookupUser(EmployeeID) = CURRENT_USER) - On the File menu, click
Save.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed in the "Applies to"
section.REFERENCES
For more information about how to resolve this issue in Microsoft
Access 2002, click the following article number to view the article in the Microsoft Knowledge Base:
307925
You cannot update a view in a Microsoft Access project
Modification Type: | Major | Last Reviewed: | 9/21/2005 |
---|
Keywords: | kbpending kbtshoot kbcode kbBug KB905476 kbAudDeveloper kbAudITPRO |
---|
|