Form causes recorset to be Not updateable

spinktec

Registered User.
Local time
Today, 15:48
Joined
Nov 30, 2007
Messages
20
Recordset is updatable and works fine when opened from database manager or from several simple forms using DoCmd.OpenForm. Recordset becomes not updatable when opening from one particular form. Doesn't matter whether using a filter or not with the DoCmd.OpenForm statement.

Going to design view then back to Normal view opens the recordset again.

Navigating to the main form then back opens the recordset also.

This database is development and only on my computer so there are no other users. I use some module code to determine which forms to use, could I be holding something open.
 
Could you post a sample database? Zipped not Rarred.
 
I figured it out and I'm going to take the time to write this out because I've not seen it anywhere else.

The first form that was calling the second form was conveying its Allow edits, Deletions, Additions settings to the next form.

The first form is a tabed list of subforms. Each subform provides a summary form view of a complete form that shows more data of the record. Each summary form has a button to open the associated complete form and close the summary form (and it's parent).

I set the properties of the summary form to not allow Deletions, Additions, or Edits. Somehow this carried over to the complete form even though I specified in the OpenForm command called by the on click event of the button on the summary form as well as in the onload event and on current event of the complete form to allow additions, edits, and deletions.

Moreover, while I was debugging I set message boxes to pop the settings of the allow edits, additions, and deletions of the complete form. They always showed all set to true; but the recordset was still "not updateable."

I figured it out because I thought that maybe the summary form was not letting go of the record and that was causing the problem. I created an intermediary form that was not visible. The intermediary form closed the summary form and opened the complete form; guess what, the record update limitations were conveyed from the summary form through the intermediary form to the complete form.

The fix was simple: set the allow Deletions, Additions, and Edits properties of the summary form to YES and simply lock the fields.

I hope this helps someone else!
 

Users who are viewing this thread

Back
Top Bottom