How to trap for "to drop changes and save to clipboard"

Phil used Ask the Experts™
I have a multi-user Microsoft access application and am getting complaints that users are experiencing "to drop changes and save to clipboard" errors. Is it possible to trap for this or is the only solution to prevent multiple users to access the same "order" simultaneously? This is an order entry system with engineers and sales reps creating and modifying records.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dale FyeOwner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010

Generally, I block user from modifying the same record at the same time.  

You might want to take a look at this article by Jim Dettman
Distinguished Expert 2017

Are you sure that you don't have code in the forms that is dirtying the form even if the user does not change anything?

I've never had an app where this error was a problem.  Typically some eternal action prompts a change.  The user sends a payment, calls about something, sends an email, whatever.  Then someone takes that external contact and acts on it.  Users don't just call up random records to change them.
Owner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010
Pat does raise a good point.  Here is an example.

A user has a form open and is editing it (has actually made changes which have not been saved).  On that form there is a button which allows a user to open another form, which uses the same record that is displayed on the first form but which has other fields.  If the users clicks that button, before saving the record that is already on screen.  Assume that the user then attempts to save changes to this 2nd form.  The user is either going to get this message when they try to save the data in the 2nd form, or more likely, after saving the data on the second form, will get this message when they attempt to save the data in the first form.

A way to prevent this is to make sure that you save the data on the first form before opening the second.  This can be done by adding a single line of code to the Click event of the button which opens the second form:

Private Sub cmdOtherForm_Click

    if me.dirty then me.dirty = false
    docmd.openform "frmOtherForm"

End Sub

Open in new window

Mark EdwardsChief Technology Officer

I echo Pat and Dale.  The only time I've encountered this issue is when the app displays the same record in more than one place and the user makes changes to the record in the other place while there are changes pending in the first place.

Not a good idea to display data from the same record on multiple forms, and DEFINITELY DO NOT allow the data to be edited in both places, or changed by any VBA code in the other place.

If I need to "echo" data in another form for the benefit of the user, I'll have the VBA code pull it from the table or other form and paste it into a locked, unbound control.


Thank you very much, your responses helped solve the issue..

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial