Dynamic QueryDef Error Message

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

Guest

I am developing in Access 2000 and have been utilizing the KB article at
http://support.microsoft.com/kb/210242/EN-US/
as a starting point to develop a dynamic SQL statement with which to query.

After I write the appropriate code and run the query, I receive the
following error message:

"The expression On Click you enetered as the event property setting produced
the following error: A problem occurred while Microsoft Access was
communicating with the OLE Server or Active X 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. "

Any ideas from anyone regarding the source of this error?
 
Steve --

Thanks for your assistance. I did repair, as you suggested, but still got
the same error message. I then created a new form and cut and pasted all
controls and code to the new form which behaved as expected.

Could there have been a setting of the form that I inadvertantly changed
that also could have caused this error?

[MVP] S.Clark said:
Corruption. Repair and compact.

--
Steve Clark, Access MVP
FMS, Inc.
www.fmsinc.com/consulting


darrep said:
I am developing in Access 2000 and have been utilizing the KB article at
http://support.microsoft.com/kb/210242/EN-US/
as a starting point to develop a dynamic SQL statement with which to
query.

After I write the appropriate code and run the query, I receive the
following error message:

"The expression On Click you enetered as the event property setting
produced
the following error: A problem occurred while Microsoft Access was
communicating with the OLE Server or Active X 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. "

Any ideas from anyone regarding the source of this error?
 
Pardon me for jumping in.

Compact and repair doesn't always take care of corruption problems. There are
some things you can do beyond that. You have done one of them. See Tony Toews
page on corruption for a more definitive list and explanation.

http://www.granite.ab.ca/access/corruptmdbs.htm
Steve --

Thanks for your assistance. I did repair, as you suggested, but still got
the same error message. I then created a new form and cut and pasted all
controls and code to the new form which behaved as expected.

Could there have been a setting of the form that I inadvertantly changed
that also could have caused this error?

[MVP] S.Clark said:
Corruption. Repair and compact.

--
Steve Clark, Access MVP
FMS, Inc.
www.fmsinc.com/consulting


darrep said:
I am developing in Access 2000 and have been utilizing the KB article at
http://support.microsoft.com/kb/210242/EN-US/
as a starting point to develop a dynamic SQL statement with which to
query.

After I write the appropriate code and run the query, I receive the
following error message:

"The expression On Click you enetered as the event property setting
produced
the following error: A problem occurred while Microsoft Access was
communicating with the OLE Server or Active X 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. "

Any ideas from anyone regarding the source of this error?
 
John --

Thanks for your input. The link you provided has been a valuable asset, and
I have utilized several suggestions contained in the FAQ. Thanks for your
help!
 
Back
Top