Solved

Error Message: Data Has Been Changed

Posted on 2006-06-25
7
1,228 Views
Last Modified: 2012-08-13
Hi,
In have a form with a couple of subforms and a combo box that selects records.
There is a fair amount going on on the form but it was working perfectly (or seemed to).
Now I get an error message after making a few selections from the combo box. I can't seem to track down were it is coming from.

The message reads:
The data has been changed.
Another user edited this Record and saved the Changes before you attempted to save your changes.
Re-edit the record.

Any thoughts before I start tearing it apart?

Jim

 
0
Comment
Question by:JimK31
  • 3
  • 3
7 Comments
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 16980292
Try changing the default refresh rate.  The combo box may not be refreshing fast enough between selections.

To change the refresh rate go to Tools > Options > Advanced and change the "Refresh Interval (sec)" value to just 1 or 2 seconds.

0
 

Author Comment

by:JimK31
ID: 16980377
I did as you suggested and it did have a positive effect. If I moved real fast I could get it to do it again, but it was pretty good. I have a few questions.

- it was set at 60 secs. That is a big change. Is there a downside to this setting?
- this app gets distributed, does that setting go with the app or is it PC specific?
- this is an big app with many other places with lots of combos do lots of things. This has never happen before, is there a particular function that may be at fault here?

Thanks
Jim
0
 
LVL 38

Accepted Solution

by:
puppydogbuddy earned 125 total points
ID: 16980784
Set the refresh interval back to wha it was...it is irrelvant because I used it to confirm a diagnosis...not as a solution....since you did not go into specifics regards to your form and subforms.  Knowing that the refresh interval had a positive effect, tells me that the underlying cause of your problem is probably due to the fact that you have two bound subforms, each of which has edit capability on the same record at the same time. The conflict occurs when (1) there changes entered into the first subform which have not been saved to the underlying table before the second subform is opened for editing on the same record. (2) there are changes to the underlying table that have not been refreshed to the first opened subform at  the time the second subform is opened.

What can you do? There are a few things....first, try placing this code in the onDirty event of each subform and let me know if it worked.

                   Me.Dirty = False

This commits form changes immediately.
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 58

Expert Comment

by:harfang
ID: 16980827
Hello JimK31

I do not totally aggree with PDB on this one. Normally, the "dirty" event fires as soon as you start moifying a record. Simply setting Me.Dirty = False each and every time does not seem to be the best  path.

However, the recommendation holds, but only at the various points where you are likely to chnage the data through code The error message in fact  tells you that you are changing the same record from two different places at  the same time. Identify that place and issue a "Me.Dirty = False" right before you get there, and you should be all right.

(°v°)
0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 16981280
Hi JimK/Harfang,
I agree with Harfang's recommendation on placement of Me.Dirty = False.  I would, however, change the syntax slightly as follows:

         If Me.Dirty then
                Me.Dirty = False
         End If
0
 

Author Comment

by:JimK31
ID: 17008354
Sorry Guys, I was out of town. You nailed my setup. I do have two sub forms that have edit capability. I plan on looking at the suggestions made here today and will report back. Soory for the delay.
0
 

Author Comment

by:JimK31
ID: 17107815
Did not mean to keep this open so long.
Basically, after hearing what everyone was saying, I went back to the design of this form and removed several of the subforms. I think I just over did it. I did not test Me.Dirty=False, so I can not comment on that.
Thanks for the help.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question