Form won't open

C

cinnie

I've been revamping an old database and encountered a problem. One of the
forms would no longer open, giving me Error 2501: "The expression On Open
you entered as the event setting produced the following error: A problem
occurred while BG_Tracker was communicating with the OLE server or ActiveX
Control."

I was finally able to fix the problem by renaming the form, copying it, then
giving the original form name to the copy.

My fear is that others in my workplace will be plagued with the same error.
What causes this kind of behaviour, and is there a way to prevent it.
 
G

gllincoln

I've been revamping an old database and encountered a problem.  One of the
forms would no longer open, giving me Error 2501:  "The expression On Open
you entered as the event setting produced the following error:  A problem
occurred while BG_Tracker was communicating with the OLE server or ActiveX
Control."

I was finally able to fix the problem by renaming the form, copying it, then
giving the original form name to the copy.

My fear is that others in my workplace will be plagued with the same error..  
What causes this kind of behaviour, and is there a way to prevent it.

Hi Cinnie -

I've had a similar recurring problem lately using Access 2007.

I 'think' (but don't know) that (in my case) the root cause of the
problem is a corrupted MSYSObjects ~ prefixed temp querydef (type 5
object).

If the form's recordset is created with a query then you might be
running into the same problem I am. In my case it seems to involve
queries based on linked tables, seems to appear after a lockup or
freezeup or other error (usually due to a malformed reference to an
object or a typo on my part during development).

Copying the form then flipping the names around might be a temp fix
but if my suspicion is correct (corrupted MSYSObjects object) then
you are leaving orphaned and possibly corrupted artifacts laying
around that may or may not matter later? One way to clean off the
debris is to create an empty database, copy all of the visible objects
to the empty database, then do the name flip on the databases. (How
I've seemingly solved the problem for now). I tried the form object/
name flip but the problem was still there or came back a few
iterations later.

As far as I know (a rather limited quantity regarding MSYSObjects)
those ~ tilde pre-fixed temp files are supposed to go away if things
go as planned and the process closes normally. If this turns into a
recurring PITA, a possible workaround might be to Delete/Drop any type
2, 5, or 6 records in MSYSObjects "WHERE LIKE ~*" when the
application first opens.

I'm just brainstorming on it here - not making a recommendation.
Hopefully a lurking expert or two will chime in with a more informed
comment?

Sincerely,
G
 
J

John W. Vinson

I've been revamping an old database and encountered a problem. One of the
forms would no longer open, giving me Error 2501: "The expression On Open
you entered as the event setting produced the following error: A problem
occurred while BG_Tracker was communicating with the OLE server or ActiveX
Control."

I was finally able to fix the problem by renaming the form, copying it, then
giving the original form name to the copy.

My fear is that others in my workplace will be plagued with the same error.
What causes this kind of behaviour, and is there a way to prevent it.

It's probably a symptom of corruption in the form, or in the system tables
underlying the form and the database. See
http://www.granite.ab.ca/access/corruptmdbs.htm
for a thorough discussion of corruption, its causes, prevention and
(sometimes) cure.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top