AllowEdits=False Not Working

  • Thread starter Thread starter James Martin
  • Start date Start date
J

James Martin

Hello all,

I have a database of archived information that I don't want anyone to be
able to change. Accordingly I have set AllowEdits to false on all the
necessary forms. This is working perfectly on every form ... except one.

I cannot identify anything that would distinguish this form from the others.

Also, I've put in some checks to output the value of AllowEdits just in case
gremlins are setting it to true. It turns out that AllowEdits really is set
to false. But it still allows me to change anything and everything on the
form.

Has anyone else run into this? Can anyone explain what might be causing it
and what I can do to stop it? I *really* don't want to have to lock every
control on the form.

Thanks!

James
 
James Martin said:
Hello all,

I have a database of archived information that I don't want anyone to
be able to change. Accordingly I have set AllowEdits to false on all
the necessary forms. This is working perfectly on every form ...
except one.

I cannot identify anything that would distinguish this form from the
others.

Also, I've put in some checks to output the value of AllowEdits just
in case gremlins are setting it to true. It turns out that AllowEdits
really is set to false. But it still allows me to change anything and
everything on the form.

Has anyone else run into this? Can anyone explain what might be
causing it and what I can do to stop it? I *really* don't want to
have to lock every control on the form.

I've never heard of such a thing. You could, of course, work around it
by basing the form on a non-updatable query -- possibly by using the
DISTINCT keywork in the query -- but I'd like to see this form for
myself. If you'd like to send me a cut-down copy of your database,
containing only the elements necessary to demonstrate the problem,
compacted and then zipped to less than 1MB in size (preferably much
smaller) -- I'll have a look at it, time permitting. You can send it
to the address derived by removing NO SPAM from the reply address of
this message.
 
Hello again,

I found out what my problem was. When the form loads it is set to
recalculate a field. Since this field is bound to a field in the underlying
table, Access allows me to update the record, even though AllowEdits remains
false. I take it this is standard.

James
 
James Martin said:
Hello again,

I found out what my problem was. When the form loads it is set to
recalculate a field. Since this field is bound to a field in the
underlying table, Access allows me to update the record, even though
AllowEdits remains false. I take it this is standard.

Yes, albeit somewhat confusing. If you dirty a record in code, it
becomes editable even though you have AllowEdits set to false. It's odd
that you would have to recalculate a bound control in the absence of any
user activity on the form -- it suggests that maybe this should be a
calculated field, not one that is actually stored. However, if you have
to do that for some reason, you could save the record after
recalculating the control's value. Then the record would be returned to
uneditability.
 
Back
Top