Pop-Up causing a write conflict

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a pop-up form that contains a field on the same table as the main
form. When I update information in the pop-up, it sees that the record is
changed by another user (my code) and asks if I want t o save the record,
copy to clipboard or drop changes. Is there anyway to have the pop-up refer
to the same table that is open in my main form so that it doesn't see the
same table being opened by separate users? If not, is there any other
solutions to this problem?
 
You are 100% correct in that the "other" user is your other form.

In fact, anytime another user, or even "code" that runs to update a form,
and another form HAS PENDING WRITES, then just before it writes out the
data, it checks if the record been changed.

So, the simply solution is that when you "leave" the form, or "launch"
another form, simple force a disk write BEFORE you do this.


So, you can go:

if me.Dirty = True then
me.Dirty = false ' force data to disk
end if

docmd.Open "your pop up form"

So, simply add the above code to write out the data for the current form,
and that way, when you return back to the form, there is NO pending disk
writes waiting, and thus your error message will go away...
 
Have the control on the popup be unbound. Pass in the value from the main
form in openargs or via the syntax: [Forms]![FormName]![ControlName]

Dorian
 

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

Back
Top