2455 error from me.dirty

R

Ron Kunce

Hi,

I getting a bit rusty and have run into a problem where a standard call on a
command button's code of

if me.dirty then. . .

produces a 2455 error message stating that I have entered an improper
reference to the property "dirty". I have used this call hundreds of times
on other forms and I am not sure why this one form is producing this error.
Hopefully the form has not become corrupt. However, the record used by the
form is the same record from the same table as the calling form (which is
not dirty). Possibly, this is a conflict between the two forms, both using
the same record.
if so, is there a quick work-around other than setting some boolean to true
every time any field value on the second form has changed?
 
A

Allen Browne

The message suggests that this form is unbound. Does it have a RecordSource
at all?

Normally you get error 2101 if there is some reason why the record cannot be
saved (e.g. required field is blank.)

If that is not the issue, is there anything else that could have a naming
clash, e.g. a field or text box that is named "Dirty"? Of if there was any
such thing at any stage, Name AutoCorrect could be confusing Access. Or
possibly a corruption of the VBA.
 
R

Ron Kunce

I'm sorry this was old problem for which a work-around had been devised and
forgotten about. But now the work-around is causing problems with running a
report from a third called form base on data from the two previous forms
whose changes had not been saved yet and cannot be saved except on the first
calling form. This is an older application in which all the forms are bound
and there was a conflict with trying to save data from a second form to
fields from the same table/record as its calling form. Even if the first
form had no changes, the record still appears to be locked, or at least the
second called form is unable to save changes, nor can it even determine if
itself is dirty (has changes).

The work-around involved writing all the field values from the called form
to hidden fields on the calling form where they would saved when closing the
original calling form. This is proving to be a nightmarish design and I
have concluded it will have to be rewritten with unbound forms or at least
combining the two forms that address the same record into pages on one form,
where there will be no contention.

However, it stills seems strange that the Dirty property of the second form
would throw a 2455 error. Apparently, whatever events are involved it
determining if a form is dirty or not involves having exclusive access to
the record involved.
 
A

Allen Browne

Okay, good you have traced it down.

If there are any BLOB fields (memo, hyperlink, OLE Object), Access can't
handle the concurrency between 2 separate forms working on the same data,
even if they are not both dirty, so that sounds like the old issue you
describe. You should be able to work around that by making either one of
those forms unbound.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Help with Me.Dirty 2
Error 2455 on close of db 13
Error 2455 1
Me.Dirty Help 2
error 2455 help pls! 2
Me.Dirty Don't Work 18
help with allen brownes Lock bound controls 4
Allen Browne's CboMoveto 2

Top