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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access has encountered a problem and needs to close 1

Status
Not open for further replies.

rj51cxa

Technical User
Mar 16, 2006
216
GB
I am running Microsoft Office 2003 with SP3 on a Windows XP PC.

My Access database opens with a Menu Form on which there a number of command buttons. All of them work fine except for one which has an intermittent problem. When I click on it, the programme thinks for a few seconds and then up pops a Microsoft Access Dialog Box which says:

"Microsoft Office Access has encountered a problem and needs to close. We are sorry for this inconvenience"

It offers me the option of repairing and re-starting the database but this does not fix the problem.

If I re-start my PC, the command button will work, but not always. If I try to open the form from the database window, the same thing happens. However, I can open the underlying query.

It seems strange that it happens with just this one command button. I have checked the form and all seems in order. When the form does open from the command button, all the VB coding within it works OK.

Any ideas would be most welcome.

Best Regards
John
 
Thanks SeeThru, I'll give it a try.

Best Regards
John
 
If the data base is 'LARGE' you will see this more often.

Another possability is that the form open to different data (RecordSource results) and there is some bad data in the recordset. Occassionally occurs whn there is a memo field which been corrupted. Corrupted memo fields useually do not affect performance unless they are actually retrieved. The only soloution I have found for this is to review the memo field of (potential) concern to check for errors. Some times you can just compact / repair the part (BE?) of the system where the corrupted data resides.




MichaelRed


 
Thanks MichaelRed

I thought I would do a little more research today and reduced the size of the underlying table to one record. The idea was to eliminate any corrupt data in the table. This made no difference and the form would still not open. I therefore concluded that there must be some corrupt coding in the form.

I was interested in your comment about compacting and repairing the part of the database that is affected. I really need to find a way of checking the form for corrupt coding but I have not been able to find a way to do this. Is it possible to take a single form and analyse it?

The only other way, I guess, is to completely re-build the form, using the data from the query, but this is quite an involved task, given the amount of coding in the individual fields.

Any more ideas would be most welcome.

Best Regards
John

 
John said:
" ... reduced the size of the underlying table to one record ... "

... and then did a compact and repair on that database ... ?


Rather than manually rebuild a form, look into text out / in

There is also an undocumented command / switch "Uncompile )or decompile) which sets the status of EVERY item of every object to require compilation. Setting the option / switch and then doing a "compile" cause Ms. A. to review all of everything for errors. Haven't used it recently, so do the search and follow steps outlined ... may provide more substantial clues ...



MichaelRed


 
Thanks MichaelRed,

I'll have a go and see what happens. I'll let you know.

Best Regards
John
 
I've solved the problem at last, by a process of elimination. It turned out to be an incorrect piece of coding in a look-up field of the underlying table. I eventually solved it by trying to auto-create a form from the table. I created a new table and added one field at a time from the old table. As I added a new field, I would try and create a form. If I was able to, the field was OK. Eventually I added a field which resulted in the original message, so I was then able to check out that field. After that, it was only a question of changing the look-up coding and following that through to the query and the form.

Thanks to all who tried to help.

Best Regards
John
 
Thanks PHV, that looks like it could be very useful. although I think I have fixed the problem, I'll download it anyway as.

Best Regards
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top