Error

J

Jone

I get an error when I do anything on a form, the error = "A problem occurred
while (database name) was communicating with the OLE server or ActiveX
control†I don’t have any ActiveX or OLE server!, this comes up if I write
any code or a macro, and then I can’t do anything I have to make a new form
and make sure I don’t write code
 
J

Jone

APPLIES TO
• Microsoft Office Access 2003
• Microsoft Access 2002 Standard Edition
• Microsoft Access 2000 Standard Edition

I'm having the problem in access 2007
 
T

Tom Wickerath

Hi Jone,

So, to summarize, you've created a brand new database in Access 2007, SP-1,
imported all objects *except* for the two problem forms, and then re-created
one of the forms from scratch. This only comes up when you create code or
attach a macro to this new form. Have I captured this accurately?
This problem only comes up on 2 of my forms not all

Do any of your other forms include VBA code or call macros? Or, does this
problem only strike forms that have this in common? If this only happens on
forms that include VBA code, and/or include macro(s) in the event procedures,
then [Long shot, but worth a try] try temporarily disabling your antivirus.

Also, are you able to use the undocumented SaveAsText command on these
forms? Try doing so on a newly built form, *before* doing anything that
causes this error (apparently adding code or calling a macro). Save the
output file with an appropriate name. Here is an example, from the Immediate
Window (open with <Ctrl><G>):

Application.SaveAsText acForm, "FormName", "C:\Temp\OkForm.txt"

Then, do whatever you've done in the past that causes this error to be
generated. Then repeat the SaveAsText to a new filename. For example:

Application.SaveAsText acForm, "FormName", "C:\Temp\BadForm.txt"

Use NotePad, and copy/paste the contents of the two text text files to a
reply.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
J

Jone

Ok no problem I'll copy the form in text, whan I think the problem is, in
those two forms I have a subform, that may be the problem,but why should it?

Tom Wickerath said:
Hi Jone,

So, to summarize, you've created a brand new database in Access 2007, SP-1,
imported all objects *except* for the two problem forms, and then re-created
one of the forms from scratch. This only comes up when you create code or
attach a macro to this new form. Have I captured this accurately?
This problem only comes up on 2 of my forms not all

Do any of your other forms include VBA code or call macros? Or, does this
problem only strike forms that have this in common? If this only happens on
forms that include VBA code, and/or include macro(s) in the event procedures,
then [Long shot, but worth a try] try temporarily disabling your antivirus.

Also, are you able to use the undocumented SaveAsText command on these
forms? Try doing so on a newly built form, *before* doing anything that
causes this error (apparently adding code or calling a macro). Save the
output file with an appropriate name. Here is an example, from the Immediate
Window (open with <Ctrl><G>):

Application.SaveAsText acForm, "FormName", "C:\Temp\OkForm.txt"

Then, do whatever you've done in the past that causes this error to be
generated. Then repeat the SaveAsText to a new filename. For example:

Application.SaveAsText acForm, "FormName", "C:\Temp\BadForm.txt"

Use NotePad, and copy/paste the contents of the two text text files to a
reply.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

Jone said:
I did that, and getting the samp error
 
T

Tom Wickerath

I forgot about the subforms. Okay, produce a total of four text files using
the undocumented Application.SaveAsText method:

OkForm.txt
OkSubForm.txt
BadForm.txt
BadSubForm.txt

Either post the contents of these four text files to a reply, clearly
indicating the name associated with each (you cannot post the actual text
files, since attachments are not allowed), or, better yet, if possible add a
sample database that is experiencing this problem to a .zip file, and provide
a hyperlink for others to download it. This second alternative is actually
much preferable to pasting the contents of the text files.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
J

Jone

How do I add a hyperlink ? If you want to do me a favor and provide your
e-mail address or email me at smilebesthello at gmail dot com
 
T

Tom Wickerath

Hi Jone,

I just sent you a private reply, that includes an image. I wanted to
follow-up with a public reply, so that anyone else who might run into a
similar problem might find this thread if they search the newsgroups. The
text of my reply is repeated below, without the image.
_____________________________

You have a text box control that has the Keyboard Language format and name
properties set to some Unicode format (Hebrew?), with control source = Name.

It appears as if Access is getting mixed up, and cannot handle having a
control with this type of unicode formatted name, when you add any VBA code
with a primary editing language (Office Button | Access Options... | Language
Settings...) set to English (which, I'm guessing, is what your default
editing language is set to).

I was able to avoid the errors simply by renaming the text box from this
Unicode formatted value to an English value, such as txtName.

By the way, the word "Name" is a reserved word in Access. You will save
yourself potential headaches in the future, if you avoid using any reserved
words for things that you assign a name to in Access. Access MVP Allen Browne
has a very nice free utility, called the Database Issue Checker, which you
can download from his web site, here:
http://allenbrowne.com/AppIssueChecker.html. I recommend that you download a
copy, and perhaps print out the list of reserved words, so that you will have
a handy reference of words to avoid using.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 

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