Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Error Message: Data Has Been Changed

Posted on 2006-06-25
7
Medium Priority
?
1,235 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 375 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

704 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