Help -- getting crazy error message!

  • Thread starter Thread starter Neal Tipton
  • Start date Start date
N

Neal Tipton

Dear Group:

I have a subform with two buttons neither of which work properly. When
clicked each one produces the following error message:

"The expression 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."

Earlier when trying to write the VBA for the buttons I found that whenever I
clicked the "..." button on the On Click property, it sent me to a module
for another form. I had to delete the buttons completely and start over
again before it would send me to the appropriate module. Now I get the
message above.

Something else, just to see what would happen, I tried creating a command
button ("Command 16", I think it was) with an On Click subroutine that
couldn't fail:

Private Sub Command16_OnClick()
MsgBox ("OK")
End Sub

Again, the same @$#%& message! What's going on and how do I fix it?

Neal Tipton
 
Hi Neal.

The database is partially corrupt.

1. Delete the problem form.

2. Compact the database.

3. Close it.

4. At the command prompt, enter something like this. It's all one line, and
include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\My Documents\MyDatabase.mdb"

5. Open it and compact again.

6. Open a code window, and choose Compile from the Debug menu. Repeat until
there are no compile errors.

7. Import the deleted form from a backup copy of the database.

Post back for further instructions if that still doesn't solve the problem.
 
Many thanks indeed! All it took to solve the problem was steps 1 through 3,
although I did the remaining steps anyway. Bless you!
Neal
 
Back
Top