Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error: "The memory could not be written"

Status
Not open for further replies.

RYankowitz

Programmer
Jun 13, 2000
27
I have an application that crashes Access with the following error message:

The instruction at "0x77f7d40f" referenced memory at "0x20306674"
The Memory could not be written.


Followed by a similar error which reads "...could not be read."

The conditions:
1. Access 2000
2. Crash occurs immediately upon previewing one of the reports in the application (and only that one). As far as I can tell, none of the code in the report's VBA module executes (in any case, the only code in the Report_Open sub is a "DoCmd.Maximize" statment, which causes no problems in any of the other reports in this application).
3. The query which drives this report can be successfully run.
3. Crash does not occur on Win98 or WinNT4.0 machines, but does on Win2000 machines.
4. Microsoft's KnowledgeBase advises installing the SR-1a update for Office2000. This did not solve this problem.
5. "Compact and Repair"ing the database didn't help.

Any thoughts?

Thanks...

 
What happens when you comment out the "DoCmd.Maximize"?
Unrelated, but using OLE Automation to export VBA code from Word works in Word '97 but CRASHES in Word 2000.
 
Thanks for the idea, LMRollins.

I've seen and tried this fix, but it did not work. The "memory could not be written" error appears to have a large variety of causes, and your fix (the LaserJet 4000 driver) only applies to one of them.

I still haven't found the solution for my situation...
 
Dear RYankowitz,

I have seen this exact problem before but have no solution to date. I can however direct you to a couple of relvant postings that might help. First, one of mine:

Access97 Run-time Report Preview Error -The memory could not be "read" 5th Feb 2002

This posting reports a very similar set of conditions to your own.

Secondly:

Application Error - The memory could not be written/read
14th Sept 2000

This is an excellent posting and set of responses on the matter of 'memory could not be read/written erros'.

I have been following this one for a long time, an if you want my hunch, in the specific case you (and I) have raised - that of crashes at report print preview from Access, I think its down to bad/wrong printer drivers. The environment in which I was working had many, similar, networked laser printers, and I suspect the drivers were muddled. The fault has never been seen outside that networked environment so I think its the environment rather than the database.

To help advance the topic in relation to print preview, can you tell me how complex the report was. Was it one or many pages, did it have a graphic header or anything demanding for the printer, or was it just based on text? How confident are you about the printer having the correct driver ? Please reply as no one else to my knowledge has reported this report print preview memory error. With many thanks, jobo123.
 
Try copy pasting the offending report to another report. This process may itself cause a crash. If it does'nt then rename the old report to a backup name, and the new report to the old name, and try re-running the report. This may fix the problem, and would indicate some unexplainable, undetectable "local object" corruption problem which Ive had before, and which can sometimes be fixed using the above method.

Not terribly scientific, but you never know ...
Cheers,
Steve
 
I found the KB on microsoft about the printer problems. I started out working on this dbf on a Win98 machine and then went to a WinXP machine. That's when the problem started. I uninstalled the xp drivers and then installed the 2000 drivers and have had no problems since (knock on wood). We have a HP 4050TN network printer and a bunch of other HP printers so I really think the printer driver was the problem. My husband also told me that he had heard somewhere that Access didn't like it when you gave object very long names so I also shorted all of my object names.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top