A problem occured while communicating with the OLE Server or ActiveX control

  • Thread starter Thread starter Ryan Langton
  • Start date Start date
R

Ryan Langton

I'm getting this error in my .adp for the On Got Focus events of my combo
boxes. The On Got Focus event simply populates the drop-down list based on
other form fields (code following the error). The strange thing is that I
have not touched the code since last week when it was working, and when
debugging, the program never reaches my control breaks in the On Got Focus
event. So I am wondering what else could cause this error?

Ryan
+++++++++++++++++++++++++++++++++++++++++++++++++++
The On Got Focus expression you entered as the event property setting
produced the following error: A problem occured while 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
+++++++++++++++++++++++++++++++++++++++++++++++++++
Private Sub cmbVersion_GotFocus()
' Repopulate drop-down list based on Software Title
Dim stQuery As String

stQuery = "SELECT Version FROM tblSoftwareOwnership WHERE " & _
"tblSoftwareOwnership.SoftwareTitle = '" & cmbSoftwareTitle & "'
GROUP BY Version"
cmbVersion.RowSource = stQuery

End Sub
 
Just an FYI this error is occuring with all events for any control on this
particular form.
 
Hi Ryan,

Sounds like your form is corrupted, does the same happen for any other
forms?

If not then if you can open the form, select all the objects CTRL-A,
CTRL-C and then open a new form and copy them to it CTRL-V, copy all
the code as well, to see if the new form works. I used to get this all
the time but have not had the problem for a while now, I used to make
backups of y development works every couple of hours to get round this
problem.

If the problem exists for other forms then try to repair the database.

Hope it helps


Regards

Alex
 
The cause may also be a big syntaxe error in the code behind the form . Try
the Compile command under the Debug menu of the VBA window. If no result,
force a full recompilation by adding a dummy reference in the References
window and relaunching the Compile command. Maybe something will come out.
 
Back
Top