Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field can't be updated- error 3164 on a subform

Status
Not open for further replies.

SGooding

Technical User
Jun 11, 2002
7
US
I have a subform on a mainform that is using an autonumber as the primary key. The primary key field is WONumber, the child field is WONumber3. The subform has a one-to-one relationship with the mainform which is unusual but necessary for the security set up.

The problem is that when I go to enter data in the first data field of the subform I get the 'Field can't be updated' error message. As soon as I hit ok everything is fine and i can update the record. I've checked the Locked property, there are no other users in the database- I'm baffled?

Anyone have an idea of something else I can check?

Thanks! [smile]
 
This error is most likely a result of violating the referential integrity of the database. This would occur, for example, if you add a child record without storing the foreign key that relates it to the parent record, or if you add a parent record that attempts to duplicate the value of the primary key. You can determine if this is causing your problem by opening the relationships window, double clicking on the relationship, and seeing if the "Enforce Referential Integrity" check box is selected. If it is, you can uncheck it and rerun your program. If the error goes away, you know this is causing it. Instead of leaving the Enforce Referential Integrity box unchecked, it would probably be better to determine why your code is violating the integrity of the database.

dz
 
I double checked the relationship between the main table and the subform table- I unchecked the referential integrity box and still had the same problem. The funny thing is that I can still update the table- just not until I clear the error.

Thanks for the note- I hadn't checked that and did find another relationship that needed to be updated.

Any other thoughts as to where I might be going wrong?

Thanks!
 
I'm currently have the exact same problem, and like yours it's not referential integrity.

Did you ever figure out why?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top