Way to not display write conflict box

  • Thread starter Thread starter John
  • Start date Start date
J

John

I was wondering if anyone has ever needed to insert
information into a record that is already being edited and
just somehow turned off showing the write conflict box
that is shown in Access.

Otherwise, what I am trying to do is when a user chooses a
value, it inserts the appropriate description from another
table in SQL. when can I run the code so I do not get the
write conflict error when inserting the description field?

If someone could help with this, I would greatly
appreciate it.

Thanks,
John
 
I am sure you mean to not ignore the message, since in fact you are about to
loose data!

However, the solution *usually* to this problem is rather simple:

Simply force a disk write, and THEN run your update code. That way, the
update code does NOT cause a error. So, try:


me.Refresh
'...you update code

In fact, when I launch another form that will use/edit the same data, or of
course when you launch a report from a form, then again it makes a LOT OF
sense to force a disk write.

So, there is a good number of places I use the me.refresh. Since virtually
all of my forms are usually restricted to "one" record, then I very liberal
with the use of use me.fresh.

However many of the very advanced and well educated developers here in the
newsgroup have suggested to me that the above me.refresh should be replaced
with:

if me.dirty = True then
me.Dirty = false
endif

Either way, a disk write is forced, and that is what you need. However, the
last example is really the best way to do this.
 
Back
Top