[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Access VBA Error 7878 The Data Has Been Changed

Posted on 2007-08-08
14
Medium Priority
?
4,202 Views
Last Modified: 2013-11-27
I have a tabular form which displays re-calculated data.

I have a sub which reports progress to the tabular form.

When I initialize my staging tables and report to the form I get the 7878 error. Obviously this is because the data underlying the form has been deleted but the text box control that is displaying my reporting text is not bound to the underlying data of the form...so why the error?

Does anyone know how I can prevent this from happening?
0
Comment
Question by:advlegals
  • 5
  • 3
  • 2
  • +3
14 Comments
 
LVL 20

Expert Comment

by:clarkscott
ID: 19656291
You must be sharing information between the 2 forms.  Also, this record source must be changing, or being 'adjusted' prior to the form(s) load.

Scott C
0
 

Author Comment

by:advlegals
ID: 19656316
There is only one form. I'm reporting from a sub to the form.

The record source is changing, I'm initializing my staging tables before reporulating and recalculating. This is what is causing the error but I can't seem to even error catch it.
0
 
LVL 20

Expert Comment

by:clarkscott
ID: 19656320
further,
One form loads using part of a recordset.  The data is manipulated.  The second form opens, using 'shared' fields, and thus your error.

The parent and subforms do not load together.  Actually, I believe the subform data loads first........

Scott C
0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
LVL 44

Expert Comment

by:GRayL
ID: 19656333
Nothing is obvious to me.  You mention a form with a subform, staging tables and a report.  Anymore detail?
0
 

Author Comment

by:advlegals
ID: 19656357
I don't have a sub-form, only one main tabular form.
0
 
LVL 75
ID: 19656367
Can you post the code (if any) where the error occurs?

mx
0
 

Author Comment

by:advlegals
ID: 19656388
Public Sub reportProgress(ByVal strMessage As String)
On Error GoTo Err_reportProgress

Forms!frmTimeMatrix!txtProgress.SetFocus

Forms!frmTimeMatrix!txtProgress.Text = " " & strMessage

Err_reportProgress:
'GoTo report
'Resume Next

I can't even catch this error. If I continue after it breaks the sub routine runs as normal....
0
 
LVL 44

Expert Comment

by:GRayL
ID: 19656392
>I have a sub.<  What's a sub?
0
 
LVL 75
ID: 19656428
"Obviously this is because the data underlying the form has been deleted"

Meaning ??

What is the record source for the form?

Can you post the SQL?

mx
0
 

Author Comment

by:advlegals
ID: 19656537
The error happens after the tables underlying the tabular form have been initialized:

 'initialize staging tables
 dbs.Execute ("Delete from tblTime_Master")
 dbs.Execute ("Delete from tblProfessionalsTime")

When I then try to report subsequent progress to the form I get the 7878 error.
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1500 total points
ID: 19656591
Sorry, but again ... What is the record source for the form?

"the tables underlying the tabular form "

Tabular ... you mean one form in datasheet view?

mx
0
 

Author Comment

by:advlegals
ID: 19657275
The record source for the form is tblTime_Master.

I'm not viewing the tabular form in datasheet view, I'm using form view, the default view is 'Continuous Form'.

Thanks for your efforts so far.
0
 

Expert Comment

by:scifair
ID: 21157203
I had perhaps a similar problem - trying to put text into a textbox using textbox.text = string.  The solution was to check (or keep track) of when the underlying data for the form had changed, then do the following BEFORE the textbox.text was set:
form.refresh  - This updates the form with new underlying data
doevents      - this allows the form to update and or waits.  
textbox.text = string
So, How do you know if the form's uderlying data has changed? I knew when I changed it so no problem for me.  
Perhaps you could also check some form property (i did not investigage this) or you could trap the error 7878 and do the code above then return to do the textbox.text = string statement.
This seems to be a more clear answer to this issue but not directly related.
Hope it helps others
0
 

Expert Comment

by:Happ1mar
ID: 36033743
I just added a Resume in Error Handling on Message
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

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…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
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: …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

873 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