<le*********@natpro.com> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.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