On Current Error

A

Amy Blankenship

I am trying to add an on current event to my current subform. However, even
an empty sub throws the error "The Expression on Current you entered as the
event property setting produced the following error: A problem occurred
while Microsoft access was communicating with the OLE server or ActiveX
control." If I completely remove the Form_Current sub, this goes away, but
of course then I can't react to the form's current event.

Anyone know what this means?

Thanks;

Amy
 
T

tina

"The Expression on Current you entered as the
*event property setting*

sounds like Access isn't happy with the setting on the Current event
property "line" in the Properties box. does that line show [Event
procedure], or something else?

hth
 
A

Amy Blankenship

It shows [Event Procedure]. It also shows that even if I actually delete
the procedure from the module, and continues to error unless I remove the
text [Event procedure] from the current property line manually...

-Amy

tina said:
"The Expression on Current you entered as the
*event property setting*

sounds like Access isn't happy with the setting on the Current event
property "line" in the Properties box. does that line show [Event
procedure], or something else?

hth


Amy Blankenship said:
I am trying to add an on current event to my current subform. However, even
an empty sub throws the error "The Expression on Current you entered as the
event property setting produced the following error: A problem occurred
while Microsoft access was communicating with the OLE server or ActiveX
control." If I completely remove the Form_Current sub, this goes away, but
of course then I can't react to the form's current event.

Anyone know what this means?

Thanks;

Amy
 
M

Marshall Barton

Amy said:
I am trying to add an on current event to my current subform. However, even
an empty sub throws the error "The Expression on Current you entered as the
event property setting produced the following error: A problem occurred
while Microsoft access was communicating with the OLE server or ActiveX
control." If I completely remove the Form_Current sub, this goes away, but
of course then I can't react to the form's current event.


Sometimes(?) this means that Access can not compile the
module so the procedure is not available in an executable
form. Try opening the module and using the Debug - Compile
menu item to see if there are any compile errors in the
module. If there are, correct the code so you have a clean
compile before running the form/report.

Note that you should not edit a form/report module while the
form/report is open in anything other then design view.
Editing a form/report module while the form/report is
running is a major cause of module corruption.
 
A

Amy Blankenship

I compiled, decompiled, recompiled, etc. The only way to fix it was to copy
everything to a new database.

Thanks;

Amy
 
M

Marshall Barton

If a clean compile doesn't resolve it, decompiling would be
the next step, then the import all. Looks like you already
have the procedure down pat.

Good to hear you're up and running again, but keep in mind
the guidline about not editing code while the form is
running.
 
A

Amy Blankenship

OK, new problem. When I try to add a switchboard (to the now cleaned up
db), Access crashes when I open it in form view. I can open it in design
view without problem. This even happens without any items in the
switchboard... I'm not sure if it's related or not.

-Amy

Marshall Barton said:
If a clean compile doesn't resolve it, decompiling would be
the next step, then the import all. Looks like you already
have the procedure down pat.

Good to hear you're up and running again, but keep in mind
the guidline about not editing code while the form is
running.
--
Marsh
MVP [MS Access]


Amy said:
I compiled, decompiled, recompiled, etc. The only way to fix it was to
copy
everything to a new database.
 
M

Marshall Barton

Hard to tell if it's related or not, but it does seem
suspicious.

You might try a combination of the three steps you've
already taken:
Make a backup
Compact/Repair
Decompile
Compact/Repair
Import All
Compact/Repair
Compile
Compact/Repair

Note that you need to make sure that no code execution takes
place when doing a Compact/Repair and Decompile. Try
holding the the Shift key down to prevent your start up code
from running.
 

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