Error i dont understand

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a form with 5 option groups. Each group consists of several
options. I then added a command button. I added some/any code in the ON
CLICK event. I then attempted to click on the button, i was presented with
the following message:

The expression On Click you entered as the event property setting produced
the following error: "A problem occurred while Microsoft Office Access was
communicating with the OLE server or ActiveX Control."

I searched ms knowledgebase, but only found items related to active x
controls. The command button is not an activex control? After receiving
the message, I even commented the code out, but I am still receiving the
message. I even deleted the cmd button and added a new one, added some code
(not the same), but receiving the error message, as above. I am totally
confused.
 
Firstly, if the option buttons are in an option group, use the AfterUpdate
event of the group to respond to a change, instead of the click event of the
buttons. You can examine the Value of the group, and do whatever you need
to. This should solve the problem for you.

This error message frequently does indicate a corruption, particularly one
triggered by Name AutoCorrect and fixed with a Decompile. After changing the
code, you may like to also do this:

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact

3. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access, and compact again.
 
Your solution re: deactivate autonamecorrect appears to have solved my
problem. Your suggestion re: afterupdate property of the option group was
appreciated. thanks.
 
Back
Top