Error communicating with the OLE server or ActiveX Control

K

KumbiaKid

I'm trying to set up a very simple form to collect a prompt for a query and
am using the excellent guidance in
http://www.fontstuff.com/access/acctut08.htm. I have tried to follow the
advice in this guide carefully, but when I click on the Cancel button (as
suggested in the reference web page) I get the following error:

The expressiion On Click 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.
*The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure].
*There may have been an error evaluating the function, event, or macro.

It doesn't seem to matter what code I have in the OnClick Event Procedure.
I've simplified it to:

Private Sub CancelQueryCmdButton_Click()
MsgBox "TEST", vbOKOnly
Rem DoCmd.Close acForm, "SelectOneListNameForm"
End Sub

The code I'd like to run is, in the example above, REMed out. I tried the
MsgBox because it's so simple and I thought I couldn't get that wrong, but I
still get the error. I get the error even if I leave the Event Procedure
empty:

Private Sub CancelQueryCmdButton_Click()

End Sub

Can anyone help?
 
K

KumbiaKid

Well, I worked around this problem even though I still have no idea what the
problem is. I started from scratch and created a new form, and as far as I
have been able to determine, did everything the same way, but the new one
works just as it should! It's still a mystery and I haven't deleted the old
(non working) form just in case someone comes up with some theories I can
test. When I have time, I'll do a side-by-side comparison of the properties
of all components of the two versions of the form. One thing that is
different is that I used shorter, simpler names in the second form (for the
form and all the controls in it). And, before anyone asks, I copied and
pasted all the names into the right places in the form that doesn't work, so
it can't be due to name typos.

With that is mind, can anyone tell me how to extract the properties of forms
and objects in the forms into a document of some type?

Thanks,
KumbiaKid
 
B

banem2

I'm trying to set up a very simple form to collect a prompt for a query and
am using the excellent guidance inhttp://www.fontstuff.com/access/acctut08..htm. I have tried to follow the
advice in this guide carefully, but when I click on the Cancel button (as
suggested in the reference web page) I get the following error:

The expressiion On Click 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.
*The expression may not result in the name of a macro, the name of a
   user-defined function, or [Event Procedure].
*There may have been an error evaluating the function, event, or macro.

It doesn't seem to matter what code I have in the OnClick Event Procedure.
I've simplified it to:

Private Sub CancelQueryCmdButton_Click()
MsgBox "TEST", vbOKOnly
Rem    DoCmd.Close acForm, "SelectOneListNameForm"
End Sub

The code I'd like to run is, in the example above, REMed out. I tried the
MsgBox because it's so simple and I thought I couldn't get that wrong, butI
still get the error. I get the error even if I leave the Event Procedure
empty:

Private Sub CancelQueryCmdButton_Click()

End Sub

Can anyone help?

Create new DB and import all objects from your current db (to make
sure that MDB is not damaged). Let us know if it works now. Also make
sure you are using Latin character set in object names.

Regards,
Branislav Mihaljev
Microsoft Access MVP
 
A

AccessExplorer

I was having the same problem, so I just copied the form, deleted the
original, then renamed the copied one to the old one's name, and it works
fine.

I think the problem may have to do with some image I copied in or something.
 
T

Tieske

Me too. I have quite a complex form, suddenly it comes up with this error
everytime I try to open it. Quite weird.

Same solution worked for me; copy form, delete old one, rename copy to old
name and everything works fine again...

seems to me the form is sort of corrupted in the database, yet repairing and
compacting the database didn't work.
 
Z

zach_john

I have a an access application that will not let me embed new photos into the
data base with office 2003. I was using office 2000 and all worked ok but the
change in office version cause the break. The pictures that were already done
stayed just adding new pictures is stopped.

I'm trying to set up a very simple form to collect a prompt for a query and
am using the excellent guidance inhttp://www.fontstuff.com/access/acctut08..htm. I have tried to follow the
advice in this guide carefully, but when I click on the Cancel button (as
suggested in the reference web page) I get the following error:

The expressiion On Click 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.
*The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure].
*There may have been an error evaluating the function, event, or macro.

It doesn't seem to matter what code I have in the OnClick Event Procedure.
I've simplified it to:

Private Sub CancelQueryCmdButton_Click()
MsgBox "TEST", vbOKOnly
Rem DoCmd.Close acForm, "SelectOneListNameForm"
End Sub

The code I'd like to run is, in the example above, REMed out. I tried the
MsgBox because it's so simple and I thought I couldn't get that wrong, but I
still get the error. I get the error even if I leave the Event Procedure
empty:

Private Sub CancelQueryCmdButton_Click()

End Sub

Can anyone help?

Create new DB and import all objects from your current db (to make
sure that MDB is not damaged). Let us know if it works now. Also make
sure you are using Latin character set in object names.

Regards,
Branislav Mihaljev
Microsoft Access MVP
 
M

Myellowd

edward.teach said:
same issue here - copied the form as you all suggested and it worked fine.

KumbiaKid said:
I'm trying to set up a very simple form to collect a prompt for a query and
am using the excellent guidance in
http://www.fontstuff.com/access/acctut08.htm. I have tried to follow the
advice in this guide carefully, but when I click on the Cancel button (as
suggested in the reference web page) I get the following error:

The expressiion On Click 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.
*The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure].
*There may have been an error evaluating the function, event, or macro.

It doesn't seem to matter what code I have in the OnClick Event Procedure.
I've simplified it to:

Private Sub CancelQueryCmdButton_Click()
MsgBox "TEST", vbOKOnly
Rem DoCmd.Close acForm, "SelectOneListNameForm"
End Sub

The code I'd like to run is, in the example above, REMed out. I tried the
MsgBox because it's so simple and I thought I couldn't get that wrong, but I
still get the error. I get the error even if I leave the Event Procedure
empty:

Private Sub CancelQueryCmdButton_Click()

End Sub

Can anyone help?


I sometimes get that error message. Except for copy and pasting all the
things into a new form which always work, there are two more easier solutions
that sometimes work. 1- in the Control Panel > Regional and language settings
: set all the combo boxes to English and United states. 2- Open your form in
design view and try selecting controls on the form and deleting them, don't
do it one by one select a group of them, then each time go on Form view and
see if you get the error message again (by clicking the button which produces
that). Sometimes you get that message because one of the controls on the form
has problem, so try finding that and deleting it.
Good luck
 
K

Kai

Exact same thing is happening to me. Worked fine in office 2003 MS Access but
when I had Office 2007 installed now can't add photos to my form. ole OBJECT,
in fact, when I right click and "insert object" "new", the list includes,
word, excel, pdf.... but no picture software. if I walk to my husbands
computer, who still has 2003 no problem, works fine. can add pictures display
in report ect. Tried copying form with problem, deleting the old one and
renaming but still will not display or allow new photos. HELLLPPP!

zach_john said:
I have a an access application that will not let me embed new photos into the
data base with office 2003. I was using office 2000 and all worked ok but the
change in office version cause the break. The pictures that were already done
stayed just adding new pictures is stopped.

I'm trying to set up a very simple form to collect a prompt for a query and
am using the excellent guidance inhttp://www.fontstuff.com/access/acctut08..htm. I have tried to follow the
advice in this guide carefully, but when I click on the Cancel button (as
suggested in the reference web page) I get the following error:

The expressiion On Click 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.
*The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure].
*There may have been an error evaluating the function, event, or macro.

It doesn't seem to matter what code I have in the OnClick Event Procedure.
I've simplified it to:

Private Sub CancelQueryCmdButton_Click()
MsgBox "TEST", vbOKOnly
Rem DoCmd.Close acForm, "SelectOneListNameForm"
End Sub

The code I'd like to run is, in the example above, REMed out. I tried the
MsgBox because it's so simple and I thought I couldn't get that wrong, but I
still get the error. I get the error even if I leave the Event Procedure
empty:

Private Sub CancelQueryCmdButton_Click()

End Sub

Can anyone help?

Create new DB and import all objects from your current db (to make
sure that MDB is not damaged). Let us know if it works now. Also make
sure you are using Latin character set in object names.

Regards,
Branislav Mihaljev
Microsoft Access 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