Ms Access Error 7878
Social Groups Pictures & Albums Members List Calendar Search Forums Show Threads Show Posts Tag Search Advanced Search Find All Thanked Posts Go to Page... Thread Tools Rate Thread Display Modes 09-07-2008, 08:07 AM #1 Mikahell Registered User Join Date: Sep 2008 Posts: 3 Thanks: 0 Thanked 0 Times in 0 Posts Error 7878 (data has been changed) Hi all, I'm having this problem with error 7878, which from other posts I have seen would be an error occuring when 2 users edit the same data at the same time. However, I'm currently developping so I am the only one in the database, always. I'm trying to send the value of the primary key in some form to a parent form which will receive it in a foreign key field. On my first described form, when I click a button, it closes the form and send in a global variant the value of the textbox representing the primary key, so the other form can receive it. It works great, unless I edit data in the first form and exit the form without firstly clicking the record selector control to save the modified data (generates error 7878). I got desperate and tried various things to force access to save the current record before closing the form, but the error persists. I have tried including in my close button click's event procedure combinations of all the following, but the error still persists : DoCmd.Save RunCommand acCmdSaveRecord Me.Requery Me.Refresh DbEngine.Idle dbRefreshCache Sleep(1000) From what I understand, the saving of the record really happens (one would hope, after calling so many kind of save functions) but it "happens" only after the button's event is finished... But since the form closes in the button's click, the data is "being saved but not really completed". If I can be clearer, I think that the form's record is only saved once all user-functions stack are done and that the focus is sent back to the form, or so... I suppose it works this way, and I wanted to know if there's a kind of method to pause the execution of the current event and force the refreshing of the form (like a multi-threaded app would wait until one process is completely finished before continuing another task), so that the form would really get to "Me.Dirty = False" state before the form closes, avoiding error 7878. I've heard multithreading in access is impossible, but I don't believe it, since I have seen a user progressbar control (wish I had the code -_-) that does a loop of actions and increments the progressbar's filling to the right and we can see it filling slowly to
be down. Please try the request again. Your cache administrator is webmaster. Generated Wed, 19 Oct 2016 08:02:21 GMT by s_ac4 (squid/3.5.20)
Question Need help? Post your question and get tips & solutions from a community of 418,595 IT Pros & Developers. It's quick & easy. Run time error, "The data has been changed." P: n/a Bill Short Hello All, I have a popup form that is called from a https://bytes.com/topic/access/answers/192176-run-time-error-data-has-been-changed command button on the main form. The main form's data source is tblA. The data source for the popup form is a query that is based on tblA. The OnClose event of the popup attempts to change data in a text box on the main https://www.experts-exchange.com/questions/20720996/Run-time-error-'7878'-The-Data-Has-Changed.html form if certain changes have been made on the popup. Because both use the same data source I have tried saving the record before attempting to make the changes, I have tried refeshing both the popup and the main form. I have tried all ms access of these save attempts in the following places: My own exit command button, form unload event, form deactivate event, form close event. I continue to get the "runtime error '-2147352567 (80020009)' The data has been changed." The part that boggles my mind the most is that if I setup a save button on the popup form and click that after making my changes and then close the popup it works perfectly. If I put in a break in the code and step through it, it works perfectly. Any help ms access error would be greatly appreciated. Bill Newtown PA Nov 12 '05 #1 Post Reply Share this Question 2 Replies P: n/a Albert D. Kallal I have a LOT of forms that call other forms based on the same data source. The trick is simply to make sure RIGHT BEFORE you launch another form, you force a disk write. That way, the current record is written to disk, and then here is NO pending write. You then simply launch that other form, in your case the popup. So. me.Refresh .....code to launch popup ..... popup form may modify data. .... popup form close We are back. The above should just work fine. So, the real "trick" is to ALWAYS write out the current record to disk RIGHT BEFORE you popup, or leave to another form. While I always use me.Refresh, many of the more experienced developers here have pointed out that the following code is better: if me.Dirty = True then me.Dirty = false endif -- Albert D. Kallal (MVP) Edmonton, Alberta Canada No************@msn.com http://www.attcanada.net/~kallal.msn Nov 12 '05 #2 P: n/a Bill Short Albert, Thanks for the reply. I already run a save on the main form before opening the popup. But that is not where my error occurs. It happens when returning from the popup (if changes have been made on the popup). Have you ever seen this situation where there is a runtime error but when you put in a code break and step through there is no error? Thanks, Bill *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! No
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Run-time error: '7878' The Data Has Changed ??? Want to Advertise Here? Solved Run-time error: '7878' The Data Has Changed ??? Posted on 2003-08-26 MS Access 1 Verified Solution 5 Comments 2,175 Views Last Modified: 2012-06-27 Run-time error: '7878' The Data Has Changed Why do I get this error? and How can I fix it? there is no one else in the database and here is the code that causes the conflict Forms![Personnel]![subformSPONSORS].Form![txtAuthorized_By] = CurrentUser() here is the entire procedure, I think it might have something to do with a report being opened If Not IsNull(DLookup("[Social_Security]", "DRIVINGRECORD", "[Social_Security]='" & Forms!Personnel.txtSSN & "' AND Suspended=True")) Then Forms!Personnel.lblSuspended.Visible = True MsgBox "Person's driving privaleges have been suspended!" Else Forms!Personnel.lblSuspended.Visible = False If IsNull(Me.VSerial) Then Me.VSerial = CreateVSerial(Format$(Date, "yy"), 5) Me.Dirty = False End If Me.Issue_Date = CDate2Julian(Date) If IsNull(Forms![Personnel]![subformSPONSORS].Form![txtAuthorized_By]) Then Forms![Personnel]![subformSPONSORS].Form![txtAuthorized_By] = CurrentUser() End If stDocName = "TempPass" DoCmd.OpenReport stDocName, acPreview End If 0 Question by:Salvia Facebook Twitter LinkedIn Google LVL 6 Best Solution byGPrentice00 Salvia -- you can't just request a delete in this question -- you have to invite a moderator to come into this question to take action. Moderators (who do the deletions) don't enter the technical areas Go to Solution 5 Comments LVL 5 Overall: Leve