|
Home > Archive > MS Access database support > April 2006 > access97 readonly form allows data entry if form becomes dirty
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
access97 readonly form allows data entry if form becomes dirty
|
|
| lesperancer@natpro.com 2006-04-07, 7:42 am |
| I've got a form that is opened in readonly mode and no fields can be
changed, great
but if I click on a combo box that has an _enter() event that sets a
field on my form to a value (albeit the same value it currently has),
the form becomes 'dirty'
and from that point on, I can changed any data in any field
and I checked the .allowEdit setting, and it is still false, which is
misleading me ?
other than cleaning up the application, is there a way to prevent a
'read only' form from becoming 'dirty' ? is there an event to trap this
?
| |
| Rick Brandt 2006-04-07, 7:42 am |
| <lesperancer@natpro.com> wrote in message
news:1144407537.859452.202850@z34g2000cwc.googlegroups.com...
> I've got a form that is opened in readonly mode and no fields can be
> changed, great
> but if I click on a combo box that has an _enter() event that sets a
> field on my form to a value (albeit the same value it currently has),
> the form becomes 'dirty'
> and from that point on, I can changed any data in any field
>
> and I checked the .allowEdit setting, and it is still false, which is
> misleading me ?
>
> other than cleaning up the application, is there a way to prevent a
> 'read only' form from becoming 'dirty' ? is there an event to trap this?
That is expected behavior. Once data in a read-only form is programmatically
changed then it is no longer Read-Only while on that record.
Change the code in the Enter event of your Combo so that it only sets the value
when the form is NOT in Read-Only mode. Or you could change the
RecordSourceType to Snapshot which should also prevent edits. That might cause
your Enter code to raise an error though.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
|
|
|
|
|