Error Message when running report

J

Jennifer Nadey

I have a report, which runs off a query, which runs off a table. I added a
column of data to the table and then that column to the query. I went into
the report via Design View and added a text box to display the value of the
new column. When I try to run the report, I get the following error
message:

"The expression On Format you entered as the event property setting produced
the following error: The object doesn't contain the Automation object
'<<Ex[r>>.'.
* 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 thoughts on how I can fix this error?

Thanks,
Jennifer
 
S

strive4peace

Hi Jennifer,

Expr1 is what Access will assign for the first calculated field in a
recordset... I suspect that

Ex[r

needs to change to Expr

You either have a bad reference in your code, a calculated field in the
report, or the query that the report is based on.

I would check the query first -- look at the calculated fields. You
can, by the way, change Expr1 to be something more logical... anything
before the colon in a query will be the fieldname that the report uses.
Avoid spaces and special characters (except underscore) in names.

To check your code:

go to the design view of any module:

'~~~~~~~~~ Compile ~~~~~~~~~

Whenever you change code or references, your should always compile
before executing.

from the menu in a module window: Debug, Compile

fix any errors on the yellow highlighted lines

keep compiling until nothing happens (this is good!)

'~~~~

if you didn't find it yet, we can give you more things to check

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
J

Jennifer Nadey

Sorry there was a typo in my re-typing of the error message. The error
message did say <<Expr>>.

I changed the name of the field I added and tried to rerun the report but
got the same error. The query runs and provides the correct data with no
error.

Thanks!
Jennifer


strive4peace said:
Hi Jennifer,

Expr1 is what Access will assign for the first calculated field in a
recordset... I suspect that

Ex[r

needs to change to Expr

You either have a bad reference in your code, a calculated field in the
report, or the query that the report is based on.

I would check the query first -- look at the calculated fields. You
can, by the way, change Expr1 to be something more logical... anything
before the colon in a query will be the fieldname that the report uses.
Avoid spaces and special characters (except underscore) in names.

To check your code:

go to the design view of any module:

'~~~~~~~~~ Compile ~~~~~~~~~

Whenever you change code or references, your should always compile
before executing.

from the menu in a module window: Debug, Compile

fix any errors on the yellow highlighted lines

keep compiling until nothing happens (this is good!)

'~~~~

if you didn't find it yet, we can give you more things to check

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jennifer said:
I have a report, which runs off a query, which runs off a table. I added a
column of data to the table and then that column to the query. I went into
the report via Design View and added a text box to display the value of the
new column. When I try to run the report, I get the following error
message:

"The expression On Format you entered as the event property setting produced
the following error: The object doesn't contain the Automation object
'<<Ex[r>>.'.
* 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 thoughts on how I can fix this error?

Thanks,
Jennifer
 
S

strive4peace

Hi Jennifer,

did you Compile your code?

did you change the ControlSource and Name properties on the report (in
design view) to match the columnname in your query?

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jennifer said:
Sorry there was a typo in my re-typing of the error message. The error
message did say <<Expr>>.

I changed the name of the field I added and tried to rerun the report but
got the same error. The query runs and provides the correct data with no
error.

Thanks!
Jennifer


strive4peace said:
Hi Jennifer,

Expr1 is what Access will assign for the first calculated field in a
recordset... I suspect that

Ex[r

needs to change to Expr

You either have a bad reference in your code, a calculated field in the
report, or the query that the report is based on.

I would check the query first -- look at the calculated fields. You
can, by the way, change Expr1 to be something more logical... anything
before the colon in a query will be the fieldname that the report uses.
Avoid spaces and special characters (except underscore) in names.

To check your code:

go to the design view of any module:

'~~~~~~~~~ Compile ~~~~~~~~~

Whenever you change code or references, your should always compile
before executing.

from the menu in a module window: Debug, Compile

fix any errors on the yellow highlighted lines

keep compiling until nothing happens (this is good!)

'~~~~

if you didn't find it yet, we can give you more things to check

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jennifer said:
I have a report, which runs off a query, which runs off a table. I added a
column of data to the table and then that column to the query. I went into
the report via Design View and added a text box to display the value of the
new column. When I try to run the report, I get the following error
message:

"The expression On Format you entered as the event property setting produced
the following error: The object doesn't contain the Automation object
'<<Ex[r>>.'.
* 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 thoughts on how I can fix this error?

Thanks,
Jennifer
 
J

Jennifer Nadey

Thanks Crystal! Not sure what I did to that report, but since I only added
one column. I made another copy of the original and then added the column
again. This time the report was able to run!

Thanks again,
Jennifer

strive4peace said:
Hi Jennifer,

did you Compile your code?

did you change the ControlSource and Name properties on the report (in
design view) to match the columnname in your query?

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jennifer said:
Sorry there was a typo in my re-typing of the error message. The error
message did say <<Expr>>.

I changed the name of the field I added and tried to rerun the report but
got the same error. The query runs and provides the correct data with no
error.

Thanks!
Jennifer


strive4peace said:
Hi Jennifer,

Expr1 is what Access will assign for the first calculated field in a
recordset... I suspect that

Ex[r

needs to change to Expr

You either have a bad reference in your code, a calculated field in the
report, or the query that the report is based on.

I would check the query first -- look at the calculated fields. You
can, by the way, change Expr1 to be something more logical... anything
before the colon in a query will be the fieldname that the report uses.
Avoid spaces and special characters (except underscore) in names.

To check your code:

go to the design view of any module:

'~~~~~~~~~ Compile ~~~~~~~~~

Whenever you change code or references, your should always compile
before executing.

from the menu in a module window: Debug, Compile

fix any errors on the yellow highlighted lines

keep compiling until nothing happens (this is good!)

'~~~~

if you didn't find it yet, we can give you more things to check

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jennifer Nadey wrote:
I have a report, which runs off a query, which runs off a table. I added a
column of data to the table and then that column to the query. I went into
the report via Design View and added a text box to display the value
of
the
new column. When I try to run the report, I get the following error
message:

"The expression On Format you entered as the event property setting produced
the following error: The object doesn't contain the Automation object
'<<Ex[r>>.'.
* 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 thoughts on how I can fix this error?

Thanks,
Jennifer
 
S

strive4peace

you're welcome, Jennifer ;) happy to help

it would be wise to learn about properties and methods... just like a
human has properties (ie: eye color, hair color, height) and methods
(eat, run, jump, sleep) ... so does every object type in Access (ie:
tables, queries, fields, controls, etc)

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jennifer said:
Thanks Crystal! Not sure what I did to that report, but since I only added
one column. I made another copy of the original and then added the column
again. This time the report was able to run!

Thanks again,
Jennifer

strive4peace said:
Hi Jennifer,

did you Compile your code?

did you change the ControlSource and Name properties on the report (in
design view) to match the columnname in your query?

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jennifer said:
Sorry there was a typo in my re-typing of the error message. The error
message did say <<Expr>>.

I changed the name of the field I added and tried to rerun the report but
got the same error. The query runs and provides the correct data with no
error.

Thanks!
Jennifer


Hi Jennifer,

Expr1 is what Access will assign for the first calculated field in a
recordset... I suspect that

Ex[r

needs to change to Expr

You either have a bad reference in your code, a calculated field in the
report, or the query that the report is based on.

I would check the query first -- look at the calculated fields. You
can, by the way, change Expr1 to be something more logical... anything
before the colon in a query will be the fieldname that the report uses.
Avoid spaces and special characters (except underscore) in names.

To check your code:

go to the design view of any module:

'~~~~~~~~~ Compile ~~~~~~~~~

Whenever you change code or references, your should always compile
before executing.

from the menu in a module window: Debug, Compile

fix any errors on the yellow highlighted lines

keep compiling until nothing happens (this is good!)

'~~~~

if you didn't find it yet, we can give you more things to check

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jennifer Nadey wrote:
I have a report, which runs off a query, which runs off a table. I
added a
column of data to the table and then that column to the query. I went
into
the report via Design View and added a text box to display the value of
the
new column. When I try to run the report, I get the following error
message:

"The expression On Format you entered as the event property setting
produced
the following error: The object doesn't contain the Automation object
'<<Ex[r>>.'.
* 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 thoughts on how I can fix this error?

Thanks,
Jennifer
 

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