Error message 'form is locked'

A

AmyLou

Trying to edit data in my database (via a form) I firstly got the error
message 'primary key cannot contain null value' (but I had added a unique
value?) then when I tried to add new data and save it I got the message:

'the object is locked, any changes you make will be discarded when the form
is closed. Click save as on the file menu and save under a different name'.

I've tried different settings but keep getting the same error message - is
my database corrupting? Please help!

Amy
 
J

Jerry Whittle

Can you enter data directly into the table?

Is the form linked directly to a table or does it go through a query?

Are there other users in the database?
 
A

AmyLou

I've tried entering data directly into the table but I get the 'Index or
primary key cannot contain a null value' message even though I had entered a
value in my 'ID' field which was also unique, so i'm not sure if it would let
me update the table and not the form. I do have two other forms which I don't
have this problem with though. Also, when I edit the data in any of the
entries I already have it accepts this, just no new entries.

The form is based on a table (as with the other two forms).

I'm still at the stage of testing the design of the database so it is not
available to other users yet.

Thankyou
 
J

Jerry Whittle

Strange especially that you have two other forms that seem to work yet you
can't enter data into the table directly.

Try this: Open the table in design view. Go to the primary key field and
click on the Lookup tab towards the lower left. Does is say anything besides
"Display Control" and "Test Box"? If so you have a lookup field which is
linked to another table or a list of values. Either way this would be very
strange as that would limit the values to something that is in another table.
Basically you'd have a 1-1 relationship. Here's a good argument for the evils
of lookup fields by Arvin Meyer and Joan Wild:
http://www.mvps.org/access/lookupfields.htm

In fact go to all the fields in the table and see if any of them have a
lookup field that is linked to another table.

OK it's not a Lookup field. What allows the other two forms to work but you
can't use another form or directly enter into a table? You'll need to really
looks close to see what it going on.

If that doesn't work, there's always the chance of corruption. Tony Toews
has an excellent web page on database corruption.
http://www.granite.ab.ca/access/corruptmdbs.htm

Allen Brown also has excellent info on corruption.
http://allenbrowne.com/ser-47.html

I have a white paper in a Word document named Fix Corrupt Access Database
towards the bottom this page:
http://www.rogersaccesslibrary.com/OtherLibraries.asp
 
A

AmyLou

Thank you very much for all these suggestions, I do have look-up boxes in my
tables and perhaps i'll need to rethink these. I'll have a good look through
the articles you've listed and let you know if I come to a solution!

Thanks again

Amy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top