473,396 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Why has my query suddenly gone read only

I am using access 2003. I have a form which is based on a simple
query. Previously I could edit the data on the form, but now it is
read only. The form has not changed and neither has the query. The
query is based on two tables, POs and PO-Items, and the SQL is as
follows:

SELECT [PO-Items].OrderID, POs.Stock, [PO-Items].ItemID, [PO-
Items].Part, [PO-Items].Unit, [PO-Items].Desc, [PO-Items].Qty, [PO-
Items].QtyDelivered, [PO-Items].Price, [PO-Items].DateRequired, [PO-
Items].EnteredItem, [PO-Items].DEPT_NAME, POs.[job#], POs.ACCOUNT_REF,
POs.Client, POs.desc, POs.delivery, POs.RequestedBy, POs.Stock,
POs.contact_name, POs.[Call_Off/Notes], POs.EMPLOYEE_ID,
POs.order_date, POs.PO_Complete
FROM [PO-Items] INNER JOIN POs ON [PO-Items].OrderID = POs.OrderID
ORDER BY [PO-Items].OrderID;

POs.OrderID is an autonumber field. PO-Items also has an autonumber
field, but it is not used in this query.

About 3 days ago, there was a data corruption on the POs table, and
one of the rows just had #ERROR in every field. I compacted the
database and everything seemed ok, but one row of data was missing. It
is since this compact that the query has been read-only. The problem
seems to be with the POs table, because if I import an old copy from
before the data corruption, the query becomes editable again.

Can anybody suggest why this might have happened, and how I might be
able to fix the problem?

Thanks for any help

Colin

Mar 27 '07 #1
2 7954
Open the table in design view, and see if there is a primary key.

Sometimes after a crash/corruption, a unique index goes bad. When you repair
the database, Access removes the index (rather than remove the data that
violates the index.) You might have a table named "MSysCompactErrors" or
similar, indicating that this happened.

In any case, the lack of a primary key/unique index on the fields that join
the tables in a query can make it read-only.

Other suggestions here:
Why is my query read-only?
at:
http://allenbrowne.com/ser-61.html
though I don't see that these others apply to your symptoms.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Bobby" <bo****@blueyonder.co.ukwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
>I am using access 2003. I have a form which is based on a simple
query. Previously I could edit the data on the form, but now it is
read only. The form has not changed and neither has the query. The
query is based on two tables, POs and PO-Items, and the SQL is as
follows:

SELECT [PO-Items].OrderID, POs.Stock, [PO-Items].ItemID, [PO-
Items].Part, [PO-Items].Unit, [PO-Items].Desc, [PO-Items].Qty, [PO-
Items].QtyDelivered, [PO-Items].Price, [PO-Items].DateRequired, [PO-
Items].EnteredItem, [PO-Items].DEPT_NAME, POs.[job#], POs.ACCOUNT_REF,
POs.Client, POs.desc, POs.delivery, POs.RequestedBy, POs.Stock,
POs.contact_name, POs.[Call_Off/Notes], POs.EMPLOYEE_ID,
POs.order_date, POs.PO_Complete
FROM [PO-Items] INNER JOIN POs ON [PO-Items].OrderID = POs.OrderID
ORDER BY [PO-Items].OrderID;

POs.OrderID is an autonumber field. PO-Items also has an autonumber
field, but it is not used in this query.

About 3 days ago, there was a data corruption on the POs table, and
one of the rows just had #ERROR in every field. I compacted the
database and everything seemed ok, but one row of data was missing. It
is since this compact that the query has been read-only. The problem
seems to be with the POs table, because if I import an old copy from
before the data corruption, the query becomes editable again.

Can anybody suggest why this might have happened, and how I might be
able to fix the problem?

Thanks for any help

Colin
Mar 27 '07 #2
On 27 Mar, 13:21, "Allen Browne" <AllenBro...@SeeSig.Invalidwrote:
Open the table in design view, and see if there is a primary key.

Sometimes after a crash/corruption, a unique index goes bad. When you repair
the database,Accessremoves the index (rather than remove the data that
violates the index.) You might have a table named "MSysCompactErrors" or
similar, indicating that this happened.

In any case, the lack of a primary key/unique index on the fields that join
the tables in a query can make itread-only.
Allen,
Thanks, that's the problem. The original POs table had a primary key
but the new one hasn't,

Colin

Mar 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: HK | last post by:
Hello, I am new to access/sql-developement and have the follwing problem: What I finally want, is to present within a form the results of a query, that are probably read-only PLUS a field...
4
by: Paul Malcomson | last post by:
I'm trying to finish implementing security on my database. I have secured the .mdb with a .mdw file as per the MS security FAQ with no problems. The last part of security that I need to...
3
by: Baldy | last post by:
Hi folks. I have a query opened from a menu bar. Is it possible to make the query read only? Thanks Al
4
by: Katherine Hanson | last post by:
I have an Access database in a network folder that only a few users have write access to. I'd like other users to be able to query the database but not update records. The problem is the code I'm...
1
by: libbythomas | last post by:
I created an Access 2000 form from a query. But I cannot edit it. I can flip through the records. If I create a table from the query (maketable) and then create the form from the table, it is...
24
by: Bob Alston | last post by:
Anyone know a way to make all access to a linked table, in another Access MDB, read only? I really don't want all the hassle of implementing full access security. I can't do this at the server...
6
by: angi35 | last post by:
Yesterday (while I was out sick), the Access 2000 database I've been refining and further developing for a company suddenly went read-only for a day. Near as I can tell, it's the backend that went...
11
beacon
by: beacon | last post by:
Hi everybody, I created a database that links one table from an ODBC data source. I saved my password and UID to the data source so neither myself nor anyone else would have to login each time...
9
by: dizzydangler | last post by:
Hi, all! After receiving a lot of help from ADezzi, Msquared, and NeoPa getting my ms access 2007 db functioning, I've run into another hitch that I haven't been able to solve. The database itself...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.